UBUNTU: ubuntu: AUFS -- update to 65835da20b77c98fb538c9114fc31f5de1328230
authorAndy Whitcroft <apw@canonical.com>
Wed, 9 Feb 2011 09:49:56 +0000 (09:49 +0000)
committerLeann Ogasawara <leann.ogasawara@canonical.com>
Mon, 28 Mar 2011 13:53:46 +0000 (06:53 -0700)
    commit 65835da20b77c98fb538c9114fc31f5de1328230
    Author: J. R. Okajima <hooanon05@yahoo.co.jp>
    Date:   Thu Feb 3 04:46:48 2011 +0900

        aufs: possible bugfix, exclude the freeing file

        There is a small window from VFS:file_kill() and au_farray_cb(), and
        the freeing file may remain in s_files list when au_farray_cb()
        traverses it.
        Test the file count and exclude the files whose count is zero in
        au_farray_cb().

Signed-off-by: J. R. Okajima <hooanon05@yahoo.co.jp>

    commit 1b2e182ba7e6e6d88b22ec25ef059bf932fe6e5b
    Author: J. R. Okajima <hooanon05@yahoo.co.jp>
    Date:   Thu Feb 3 04:41:12 2011 +0900

        aufs: tiny, remove an unused variable

Signed-off-by: J. R. Okajima <hooanon05@yahoo.co.jp>

    commit 845a9e8515ce06e90145724eaab7b725f0a4f5ae
    Author: J. R. Okajima <hooanon05@yahoo.co.jp>
    Date:   Thu Feb 3 04:40:54 2011 +0900

        aufs: test bad inode in d_revalidate

Signed-off-by: J. R. Okajima <hooanon05@yahoo.co.jp>

    commit 14602769d431dd07aaadca403f7eecb5fa58f1cf
    Author: J. R. Okajima <hooanon05@yahoo.co.jp>
    Date:   Mon Jan 31 15:23:54 2011 +0900

        aufs: for 2.6.38-rcN, protect d_count

Signed-off-by: J. R. Okajima <hooanon05@yahoo.co.jp>

    commit 5caa6667bc16649365f79b441cddfd80109eb60c
    Author: J. R. Okajima <hooanon05@yahoo.co.jp>
    Date:   Fri Jan 28 23:18:59 2011 +0900

        aufs: force the hardest test for remote branch

        When the branch fs is remote, for the hardest (udba=notify) test even if
        udba=notify is not specified.

Signed-off-by: J. R. Okajima <hooanon05@yahoo.co.jp>

    commit 2175d65a31af1c415606d7f45aeae363cf399de2
    Author: J. R. Okajima <hooanon05@yahoo.co.jp>
    Date:   Fri Jan 28 23:17:37 2011 +0900

        aufs: bugfix, test in rename

        Force the test for the case when dst is a decendant of src regardless
        its existence.

Signed-off-by: J. R. Okajima <hooanon05@yahoo.co.jp>

Signed-off-by: Andy Whitcroft <apw@canonical.com>

ubuntu/aufs/BOM
ubuntu/aufs/branch.c
ubuntu/aufs/dcsub.c
ubuntu/aufs/dentry.c
ubuntu/aufs/dir.c
ubuntu/aufs/i_op_ren.c
ubuntu/include/linux/aufs_type.h

index 2b80325..1d4f161 100644 (file)
@@ -1,2 +1,2 @@
 URL: http://git.c3sl.ufpr.br/pub/scm/aufs/aufs2-standalone.git
-COMMIT: b1cee06249dfa0ab30951e7f06490a75c155b620
+COMMIT: 65835da20b77c98fb538c9114fc31f5de1328230
index e5e222e..3690dcb 100644 (file)
@@ -878,6 +878,7 @@ static unsigned long long au_farray_cb(void *a,
        lg_global_lock(files_lglock);
        do_file_list_for_each_entry(sb, f) {
                if (au_fi(f)
+                   && file_count(f)
                    && !special_file(f->f_dentry->d_inode->i_mode)) {
                        get_file(f);
                        *p++ = f;
index 8696873..9d8cf10 100644 (file)
@@ -98,7 +98,7 @@ static int au_dpages_append(struct au_dcsub_pages *dpages,
                dpages->ndpage++;
        }
 
-       /* d_count can be zero */
+       AuDebugOn(!dentry->d_count);
        dpage->dentries[dpage->ndentry++] = dget_dlock(dentry);
        return 0; /* success */
 
@@ -124,6 +124,7 @@ resume:
        if (this_parent->d_sb == sb
            && !IS_ROOT(this_parent)
            && au_di(this_parent)
+           && this_parent->d_count
            && (!test || test(this_parent, arg))) {
                err = au_dpages_append(dpages, this_parent, GFP_ATOMIC);
                if (unlikely(err))
@@ -137,18 +138,22 @@ resume:
 
                next = tmp->next;
                spin_lock_nested(&dentry->d_lock, DENTRY_D_LOCK_NESTED);
-               if (!list_empty(&dentry->d_subdirs)) {
-                       spin_unlock(&this_parent->d_lock);
-                       spin_release(&dentry->d_lock.dep_map, 1, _RET_IP_);
-                       this_parent = dentry;
-                       spin_acquire(&this_parent->d_lock.dep_map, 0, 1,
-                                    _RET_IP_);
-                       goto repeat;
+               if (dentry->d_count) {
+                       if (!list_empty(&dentry->d_subdirs)) {
+                               spin_unlock(&this_parent->d_lock);
+                               spin_release(&dentry->d_lock.dep_map, 1,
+                                            _RET_IP_);
+                               this_parent = dentry;
+                               spin_acquire(&this_parent->d_lock.dep_map, 0, 1,
+                                            _RET_IP_);
+                               goto repeat;
+                       }
+                       if (dentry->d_sb == sb
+                           && au_di(dentry)
+                           && (!test || test(dentry, arg)))
+                               err = au_dpages_append(dpages, dentry,
+                                                      GFP_ATOMIC);
                }
-               if (dentry->d_sb == sb
-                   && au_di(dentry)
-                   && (!test || test(dentry, arg)))
-                       err = au_dpages_append(dpages, dentry, GFP_ATOMIC);
                spin_unlock(&dentry->d_lock);
                if (unlikely(err))
                        goto out;
@@ -182,11 +187,14 @@ int au_dcsub_pages_rev(struct au_dcsub_pages *dpages, struct dentry *dentry,
 
        err = 0;
        write_seqlock(&rename_lock);
-       if (do_include && (!test || test(dentry, arg))) {
+       spin_lock(&dentry->d_lock);
+       if (do_include
+           && dentry->d_count
+           && (!test || test(dentry, arg)))
                err = au_dpages_append(dpages, dentry, GFP_ATOMIC);
-               if (unlikely(err))
-                       goto out;
-       }
+       spin_unlock(&dentry->d_lock);
+       if (unlikely(err))
+               goto out;
 
        /*
         * vfsmount_lock is unnecessary since this is a traverse in a single
@@ -194,11 +202,13 @@ int au_dcsub_pages_rev(struct au_dcsub_pages *dpages, struct dentry *dentry,
         */
        while (!IS_ROOT(dentry)) {
                dentry = dentry->d_parent; /* rename_lock is locked */
-               if (!test || test(dentry, arg)) {
+               spin_lock(&dentry->d_lock);
+               if (dentry->d_count
+                   && (!test || test(dentry, arg)))
                        err = au_dpages_append(dpages, dentry, GFP_ATOMIC);
-                       if (unlikely(err))
-                               break;
-               }
+               spin_unlock(&dentry->d_lock);
+               if (unlikely(err))
+                       break;
        }
 
 out:
index b8614ad..3c0d0ff 100644 (file)
@@ -428,10 +428,11 @@ int au_h_verify(struct dentry *h_dentry, unsigned int udba, struct inode *h_dir,
        int err;
 
        err = 0;
-       if (udba == AuOpt_UDBA_REVAL) {
+       if (udba == AuOpt_UDBA_REVAL
+           && !au_test_fs_remote(h_dentry->d_sb)) {
                IMustLock(h_dir);
                err = (h_dentry->d_parent->d_inode != h_dir);
-       } else if (udba == AuOpt_UDBA_HNOTIFY)
+       } else if (udba != AuOpt_UDBA_NONE)
                err = au_h_verify_dentry(h_dentry, h_parent, br);
 
        return err;
@@ -1053,9 +1054,12 @@ static int aufs_d_revalidate(struct dentry *dentry, struct nameidata *nd)
        if (unlikely(!au_di(dentry)))
                goto out;
 
+       inode = dentry->d_inode;
+       if (inode && is_bad_inode(inode))
+               goto out;
+
        valid = 1;
        sb = dentry->d_sb;
-       inode = dentry->d_inode;
        /*
         * todo: very ugly
         * i_mutex of parent dir may be held,
index e88d4f2..e6eb7ac 100644 (file)
@@ -207,12 +207,10 @@ static int aufs_release_dir(struct inode *inode __maybe_unused,
                            struct file *file)
 {
        struct au_vdir *vdir_cache;
-       struct super_block *sb;
        struct au_finfo *finfo;
        struct au_fidir *fidir;
        aufs_bindex_t bindex, bend;
 
-       sb = file->f_dentry->d_sb;
        finfo = au_fi(file);
        fidir = finfo->fi_hdir;
        if (fidir) {
index f7dd419..e8025ba 100644 (file)
@@ -555,6 +555,10 @@ static int au_may_ren(struct au_ren_args *a)
        if (a->dst_bstart != a->btgt)
                goto out;
 
+       err = -ENOTEMPTY;
+       if (unlikely(a->dst_h_dentry == a->h_trap))
+               goto out;
+
        err = -EIO;
        h_inode = a->dst_h_dentry->d_inode;
        isdir = !!au_ftest_ren(a->flags, ISDIR);
@@ -570,10 +574,6 @@ static int au_may_ren(struct au_ren_args *a)
                                 isdir);
                if (unlikely(err))
                        goto out;
-               err = -ENOTEMPTY;
-               if (unlikely(a->dst_h_dentry == a->h_trap))
-                       goto out;
-               err = 0;
        }
 
 out:
index 160b0b6..640673b 100644 (file)
@@ -24,7 +24,7 @@
 #include <linux/limits.h>
 #include <linux/types.h>
 
-#define AUFS_VERSION   "2.1-standalone.tree-38-rcN-20110124"
+#define AUFS_VERSION   "2.1-standalone.tree-38-rcN-20110207"
 
 /* todo? move this to linux-2.6.19/include/magic.h */
 #define AUFS_SUPER_MAGIC       ('a' << 24 | 'u' << 16 | 'f' << 8 | 's')