commit
b1cee06249dfa0ab30951e7f06490a75c155b620
Author: J. R. Okajima <hooanon05@yahoo.co.jp>
Date: Sun Jan 23 23:06:51 2011 +0900
aufs: for 2.6.38-rcN, testing, revert stop_sillyrename
Signed-off-by: J. R. Okajima <hooanon05@yahoo.co.jp>
commit
fb742969486f39f4a7a6f0859758a42189bd38d0
Author: J. R. Okajima <hooanon05@yahoo.co.jp>
Date: Fri Jan 21 16:13:16 2011 +0900
aufs: for 2.6.38-rcN, use a new member s_d_op
Signed-off-by: J. R. Okajima <hooanon05@yahoo.co.jp>
commit
6e91ff14940eeaf587dd0386a31e1f0c718ded1d
Author: J. R. Okajima <hooanon05@yahoo.co.jp>
Date: Fri Jan 21 16:14:03 2011 +0900
aufs: for 2.6.38-rcN, tiny, just a comment
Signed-off-by: J. R. Okajima <hooanon05@yahoo.co.jp>
commit
0cbbdfb0411cc28445761990079c929946f0b3b2
Author: J. R. Okajima <hooanon05@yahoo.co.jp>
Date: Fri Jan 21 16:02:21 2011 +0900
aufs: for 2.6.38-rcN, force write lock for rename_lock
Because au_dcsub_pages() cannot discard the intermediate result and
restart the traversal, always write_lock.
Signed-off-by: J. R. Okajima <hooanon05@yahoo.co.jp>
commit
742f879080f69bd1c5bf428f74fefb1b6e38565e
Author: J. R. Okajima <hooanon05@yahoo.co.jp>
Date: Fri Jan 21 16:12:01 2011 +0900
aufs: for 2.6.38-rcN, protect d_unhashed() by d_lock
Signed-off-by: J. R. Okajima <hooanon05@yahoo.co.jp>
commit
90ea0a0815b44e919737de424bce249c817ebbd6
Author: J. R. Okajima <hooanon05@yahoo.co.jp>
Date: Sat Jan 22 16:17:28 2011 +0900
aufs: possible bugfix, protect d_unhashed() by di_write_lock
Signed-off-by: J. R. Okajima <hooanon05@yahoo.co.jp>
commit
7489e85817cc5154c35664c794041c2582590616
Author: J. R. Okajima <hooanon05@yahoo.co.jp>
Date: Fri Jan 21 15:58:59 2011 +0900
aufs: tiny, replace au_d_removed() by d_unlinked()
These two small functions are identical.
Signed-off-by: J. R. Okajima <hooanon05@yahoo.co.jp>
commit
97bf43fd682b2c9aaa74eba39a405f669b4c3b31
Author: J. R. Okajima <hooanon05@yahoo.co.jp>
Date: Fri Jan 21 16:15:12 2011 +0900
aufs: testing, stop unhashing in hnotify
In aufs, all hash/unhash for dentries should follow VFS.
Signed-off-by: J. R. Okajima <hooanon05@yahoo.co.jp>
commit
f1fdfd580181ae75af84d347aa13c7b3f632a7e5
Author: J. R. Okajima <hooanon05@yahoo.co.jp>
Date: Fri Jan 21 16:00:14 2011 +0900
aufs: tiny, modify a comment
Signed-off-by: J. R. Okajima <hooanon05@yahoo.co.jp>
Signed-off-by: Andy Whitcroft <apw@canonical.com>
URL: http://git.c3sl.ufpr.br/pub/scm/aufs/aufs2-standalone.git
-COMMIT: 806051bcbeec27748aae2b7957726a4e63ff308e
+COMMIT: b1cee06249dfa0ab30951e7f06490a75c155b620
/*
* this test/set prevents aufs from handling unnecesary notify events
- * of xino files, in a case of re-adding a writable branch which was
+ * of xino files, in case of re-adding a writable branch which was
* once detached from aufs.
*/
if (au_xino_brid(sb) < 0
int au_dcsub_pages(struct au_dcsub_pages *dpages, struct dentry *root,
au_dpages_test test, void *arg)
{
- int err, locked = 0;
- unsigned int seq;
+ int err;
struct dentry *this_parent;
struct list_head *next;
struct super_block *sb = root->d_sb;
err = 0;
- seq = read_seqbegin(&rename_lock);
-again:
+ write_seqlock(&rename_lock);
this_parent = root;
spin_lock(&this_parent->d_lock);
repeat:
child = this_parent;
this_parent = tmp;
spin_lock(&this_parent->d_lock);
- /* might go back up the wrong parent if we have had a rename
- * or deletion */
- if (this_parent != child->d_parent ||
- (!locked && read_seqretry(&rename_lock, seq))) {
- spin_unlock(&this_parent->d_lock);
- rcu_read_unlock();
- goto rename_retry;
- }
rcu_read_unlock();
next = child->d_u.d_child.next;
goto resume;
out:
spin_unlock(&this_parent->d_lock);
- if (!locked) {
- if (!err && read_seqretry(&rename_lock, seq))
- goto rename_retry;
- } else
- write_sequnlock(&rename_lock);
+ write_sequnlock(&rename_lock);
return err;
-
-rename_retry:
- locked = 1;
- write_seqlock(&rename_lock);
- goto again;
}
int au_dcsub_pages_rev(struct au_dcsub_pages *dpages, struct dentry *dentry,
/* ---------------------------------------------------------------------- */
-static inline int au_d_removed(struct dentry *d)
-{
- return !IS_ROOT(d) && d_unhashed(d);
-}
-
static inline int au_d_hashed_positive(struct dentry *d)
{
int err;
err = au_d_hashed_positive(d);
else {
inode = d->d_inode;
- if (unlikely(au_d_removed(d) || !inode || !inode->i_nlink))
+ if (unlikely(d_unlinked(d) || !inode || !inode->i_nlink))
err = -ENOENT;
}
return err;
continue;
AuDbg("b%d, %.*s\n", bindex, AuDLNPair(h_dentry));
- /* spin_lock(&h_dentry->d_lock); */
+ spin_lock(&h_dentry->d_lock);
h_name = &h_dentry->d_name;
if (unlikely(do_udba
&& !is_root
AuDbg("unhash 0x%x 0x%x, %.*s %.*s\n",
unhashed, d_unhashed(h_dentry),
AuDLNPair(dentry), AuDLNPair(h_dentry));
- /* spin_unlock(&h_dentry->d_lock); */
+ spin_unlock(&h_dentry->d_lock);
goto err;
}
- /* spin_unlock(&h_dentry->d_lock); */
+ spin_unlock(&h_dentry->d_lock);
err = au_do_h_d_reval(h_dentry, nd, dentry, bindex);
if (unlikely(err))
if (dinfo) {
atomic_set(&dinfo->di_generation, au_sigen(sb));
/* smp_mb(); */ /* atomic_set */
- d_set_d_op(dentry, &aufs_dop);
dentry->d_fsdata = dinfo;
} else
err = -ENOMEM;
h_inode = h_dentry->d_inode;
if (au_test_nfsd() && !h_inode)
goto out;
- if (unlikely((!d_unhashed(dentry) && au_d_removed(h_dentry))
- || !h_inode
- /* || !dentry->d_inode->i_nlink */
- ))
+ spin_lock(&h_dentry->d_lock);
+ err = (!d_unhashed(dentry) && d_unlinked(h_dentry))
+ || !h_inode
+ /* || !dentry->d_inode->i_nlink */
+ ;
+ spin_unlock(&h_dentry->d_lock);
+ if (unlikely(err))
goto out;
sb = dentry->d_sb;
}
p = fidir->fd_hfile;
- if (!au_test_mmapped(file) && !au_d_removed(file->f_dentry)) {
+ if (!au_test_mmapped(file) && !d_unlinked(file->f_dentry)) {
bend = au_sbend(sb);
for (finfo->fi_btop = 0; finfo->fi_btop <= bend;
finfo->fi_btop++, p++)
need_reopen = 1;
if (!au_test_mmapped(file))
err = au_file_refresh_by_inode(file, &need_reopen);
- if (!err && need_reopen && !au_d_removed(dentry))
+ if (!err && need_reopen && !d_unlinked(dentry))
err = reopen(file);
if (!err) {
au_update_figen(file);
out_dpages:
au_dpages_free(&dpages);
+#if 0
/* discard children */
dentry_unhash(dentry);
dput(dentry);
+#endif
out:
return err;
}
h_file = NULL;
hi_wh = NULL;
- if (au_ftest_icpup(a->flags, DID_CPUP) && au_d_removed(dentry)) {
+ if (au_ftest_icpup(a->flags, DID_CPUP) && d_unlinked(dentry)) {
hi_wh = au_hi_wh(inode, a->btgt);
if (!hi_wh) {
err = au_sio_cpup_wh(dentry, a->btgt, sz, /*file*/NULL);
} else {
/* fchmod() doesn't pass ia_file */
a->udba = au_opt_udba(sb);
- /* no au_d_removed(), to set UDBA_NONE for root */
+ di_write_lock_child(dentry);
+ /* no d_unlinked(), to set UDBA_NONE for root */
if (d_unhashed(dentry))
a->udba = AuOpt_UDBA_NONE;
- di_write_lock_child(dentry);
if (a->udba != AuOpt_UDBA_NONE) {
AuDebugOn(IS_ROOT(dentry));
err = au_reval_for_attr(dentry, au_sigen(sb));
udba_none = !!au_opt_test(mnt_flags, UDBA_NONE);
/* support fstat(2) */
- if (!au_d_removed(dentry) && !udba_none) {
+ if (!d_unlinked(dentry) && !udba_none) {
unsigned int sigen = au_sigen(sb);
err = au_digen_test(dentry, sigen);
if (!err) {
{
au_cachep[AuCache_DINFO] = AuCacheCtor(au_dinfo, au_di_init_once);
if (au_cachep[AuCache_DINFO])
+ /* SLAB_DESTROY_BY_RCU */
au_cachep[AuCache_ICNTNR] = AuCacheCtor(au_icntnr,
au_icntnr_init_once);
if (au_cachep[AuCache_ICNTNR])
/* all timestamps always follow the ones on the branch */
sb->s_flags |= MS_NOATIME | MS_NODIRATIME;
sb->s_op = &aufs_sop;
+ sb->s_d_op = &aufs_dop;
sb->s_magic = AUFS_SUPER_MAGIC;
sb->s_maxbytes = 0;
au_export_init(sb);
err = au_dpages_init(&dpages, GFP_ATOMIC);
if (unlikely(err))
break;
- /* no way, it requires si write lock */
err = au_dcsub_pages(&dpages, sb->s_root, NULL, NULL);
if (!err)
for (i = 0; i < dpages.ndpage; i++) {
struct unlink_args *a = args;
struct dentry *d = a->path->dentry;
struct inode *h_inode;
- const int stop_sillyrename = au_test_nfs(d->d_sb);
+ const int stop_sillyrename = (au_test_nfs(d->d_sb)
+ && d->d_count == 1);
IMustLock(a->dir);
#include <linux/limits.h>
#include <linux/types.h>
-#define AUFS_VERSION "2.1-standalone.tree-38-rcN-20110117"
+#define AUFS_VERSION "2.1-standalone.tree-38-rcN-20110124"
/* todo? move this to linux-2.6.19/include/magic.h */
#define AUFS_SUPER_MAGIC ('a' << 24 | 'u' << 16 | 'f' << 8 | 's')