aufs: Update to aufs3.x-rcN-20120312

svn path=/dists/trunk/linux-2.6/; revision=18810
This commit is contained in:
Ben Hutchings 2012-03-11 05:25:53 +00:00
parent 0e88f788a7
commit f2d4c738b7
4 changed files with 72 additions and 46 deletions

1
debian/changelog vendored
View File

@ -4,6 +4,7 @@ linux-2.6 (3.3~rc7-1~experimental.1) UNRELEASED; urgency=low
[ Ben Hutchings ]
* [x86] crypto: Enable CRYPTO_SERPENT_SSE2_586, CRYPTO_SERPENT_SSE2_X86_64
* aufs: Update to aufs3.x-rcN-20120312
-- Ben Hutchings <ben@decadent.org.uk> Fri, 09 Mar 2012 05:27:29 +0000

View File

@ -11044,8 +11044,8 @@
+#endif /* __KERNEL__ */
+#endif /* __AUFS_FSTYPE_H__ */
--- a/fs/aufs/hfsnotify.c 1970-01-01 01:00:00.000000000 +0100
+++ b/fs/aufs/hfsnotify.c 2012-01-10 02:15:56.553455997 +0000
@@ -0,0 +1,247 @@
+++ b/fs/aufs/hfsnotify.c 2012-03-11 05:01:22.570973560 +0000
@@ -0,0 +1,260 @@
+/*
+ * Copyright (C) 2005-2012 Junjiro R. Okajima
+ *
@ -11074,15 +11074,17 @@
+static const __u32 AuHfsnMask = (FS_MOVED_TO | FS_MOVED_FROM | FS_DELETE
+ | FS_CREATE | FS_EVENT_ON_CHILD);
+static DECLARE_WAIT_QUEUE_HEAD(au_hfsn_wq);
+static __cacheline_aligned_in_smp atomic64_t au_hfsn_ifree = ATOMIC64_INIT(0);
+
+static void au_hfsn_free_mark(struct fsnotify_mark *mark)
+{
+ struct au_hnotify *hn = container_of(mark, struct au_hnotify,
+ hn_mark);
+ AuDbg("here\n");
+ hn->hn_mark_dead = 1;
+ smp_mb();
+ wake_up_all(&au_hfsn_wq);
+ au_cache_free_hnotify(hn);
+ smp_mb__before_atomic_dec();
+ atomic64_dec(&au_hfsn_ifree);
+ wake_up(&au_hfsn_wq);
+}
+
+static int au_hfsn_alloc(struct au_hinode *hinode)
@ -11097,7 +11099,6 @@
+ sb = hn->hn_aufs_inode->i_sb;
+ bindex = au_br_index(sb, hinode->hi_id);
+ br = au_sbr(sb, bindex);
+ hn->hn_mark_dead = 0;
+ mark = &hn->hn_mark;
+ fsnotify_init_mark(mark, au_hfsn_free_mark);
+ mark->mask = AuHfsnMask;
@ -11109,18 +11110,20 @@
+ /*mnt*/NULL, /*allow_dups*/1);
+}
+
+static void au_hfsn_free(struct au_hinode *hinode)
+static int au_hfsn_free(struct au_hinode *hinode, struct au_hnotify *hn)
+{
+ struct au_hnotify *hn;
+ struct fsnotify_mark *mark;
+ unsigned long long ull;
+
+ ull = atomic64_inc_return(&au_hfsn_ifree);
+ BUG_ON(!ull);
+
+ hn = hinode->hi_notify;
+ mark = &hn->hn_mark;
+ fsnotify_destroy_mark(mark);
+ fsnotify_put_mark(mark);
+
+ /* TODO: bad approach */
+ wait_event(au_hfsn_wq, hn->hn_mark_dead);
+ /* free hn by myself */
+ return 0;
+}
+
+/* ---------------------------------------------------------------------- */
@ -11284,11 +11287,21 @@
+ return err;
+}
+
+/* ---------------------------------------------------------------------- */
+
+static void au_hfsn_fin(void)
+{
+ AuDbg("au_hfsn_ifree %lld\n", (long long)atomic64_read(&au_hfsn_ifree));
+ wait_event(au_hfsn_wq, !atomic64_read(&au_hfsn_ifree));
+}
+
+const struct au_hnotify_op au_hnotify_op = {
+ .ctl = au_hfsn_ctl,
+ .alloc = au_hfsn_alloc,
+ .free = au_hfsn_free,
+
+ .fin = au_hfsn_fin,
+
+ .reset_br = au_hfsn_reset_br,
+ .fin_br = au_hfsn_fin_br,
+ .init_br = au_hfsn_init_br
@ -11354,7 +11367,7 @@
+ }
+}
--- a/fs/aufs/hnotify.c 1970-01-01 01:00:00.000000000 +0100
+++ b/fs/aufs/hnotify.c 2012-01-10 02:15:56.553455997 +0000
+++ b/fs/aufs/hnotify.c 2012-03-11 05:01:22.570973560 +0000
@@ -0,0 +1,712 @@
+/*
+ * Copyright (C) 2005-2012 Junjiro R. Okajima
@ -11416,9 +11429,9 @@
+
+ hn = hinode->hi_notify;
+ if (hn) {
+ au_hnotify_op.free(hinode);
+ au_cache_free_hnotify(hn);
+ hinode->hi_notify = NULL;
+ if (au_hnotify_op.free(hinode, hn))
+ au_cache_free_hnotify(hn);
+ }
+}
+
@ -13064,8 +13077,8 @@
+ .truncate_range = aufs_truncate_range
+};
--- a/fs/aufs/i_op_add.c 1970-01-01 01:00:00.000000000 +0100
+++ b/fs/aufs/i_op_add.c 2012-02-19 21:12:26.570427095 +0000
@@ -0,0 +1,711 @@
+++ b/fs/aufs/i_op_add.c 2012-03-11 05:01:22.570973560 +0000
@@ -0,0 +1,712 @@
+/*
+ * Copyright (C) 2005-2012 Junjiro R. Okajima
+ *
@ -13377,7 +13390,8 @@
+ return err;
+}
+
+int aufs_mknod(struct inode *dir, struct dentry *dentry, umode_t mode, dev_t dev)
+int aufs_mknod(struct inode *dir, struct dentry *dentry, umode_t mode,
+ dev_t dev)
+{
+ struct simple_arg arg = {
+ .type = Mknod,
@ -14259,8 +14273,8 @@
+ return err;
+}
--- a/fs/aufs/i_op_ren.c 1970-01-01 01:00:00.000000000 +0100
+++ b/fs/aufs/i_op_ren.c 2012-01-10 02:15:56.557456016 +0000
@@ -0,0 +1,1017 @@
+++ b/fs/aufs/i_op_ren.c 2012-03-11 05:01:22.570973560 +0000
@@ -0,0 +1,1026 @@
+/*
+ * Copyright (C) 2005-2012 Junjiro R. Okajima
+ *
@ -15170,6 +15184,15 @@
+ } else if (unlikely(d_unhashed(a->dst_dentry)))
+ goto out_unlock;
+
+ /*
+ * is it possible?
+ * yes, it happend (in linux-3.3-rcN) but I don't know why.
+ * there may exist a problem somewhere else.
+ */
+ err = -EINVAL;
+ if (unlikely(a->dst_parent->d_inode == a->src_dentry->d_inode))
+ goto out_unlock;
+
+ au_fset_ren(a->flags, ISSAMEDIR); /* temporary */
+ di_write_lock_parent(a->dst_parent);
+
@ -16020,8 +16043,8 @@
+ return au_test_h_perm(h_inode, mask);
+}
--- a/fs/aufs/inode.h 1970-01-01 01:00:00.000000000 +0100
+++ b/fs/aufs/inode.h 2012-02-19 21:12:26.570427095 +0000
@@ -0,0 +1,554 @@
+++ b/fs/aufs/inode.h 2012-03-11 05:01:22.570973560 +0000
@@ -0,0 +1,560 @@
+/*
+ * Copyright (C) 2005-2012 Junjiro R. Okajima
+ *
@ -16059,7 +16082,6 @@
+#ifdef CONFIG_AUFS_HFSNOTIFY
+ /* never use fsnotify_add_vfsmount_mark() */
+ struct fsnotify_mark hn_mark;
+ int hn_mark_dead;
+#endif
+ struct inode *hn_aufs_inode; /* no get/put */
+#endif
@ -16182,7 +16204,8 @@
+/* i_op_add.c */
+int au_may_add(struct dentry *dentry, aufs_bindex_t bindex,
+ struct dentry *h_parent, int isdir);
+int aufs_mknod(struct inode *dir, struct dentry *dentry, umode_t mode, dev_t dev);
+int aufs_mknod(struct inode *dir, struct dentry *dentry, umode_t mode,
+ dev_t dev);
+int aufs_symlink(struct inode *dir, struct dentry *dentry, const char *symname);
+int aufs_create(struct inode *dir, struct dentry *dentry, umode_t mode,
+ struct nameidata *nd);
@ -16479,7 +16502,13 @@
+struct au_hnotify_op {
+ void (*ctl)(struct au_hinode *hinode, int do_set);
+ int (*alloc)(struct au_hinode *hinode);
+ void (*free)(struct au_hinode *hinode);
+
+ /*
+ * if it returns true, the the caller should free hinode->hi_notify,
+ * otherwise ->free() frees it.
+ */
+ int (*free)(struct au_hinode *hinode,
+ struct au_hnotify *hn) __must_check;
+
+ void (*fin)(void);
+ int (*init)(void);
@ -17022,8 +17051,8 @@
+ccflags-y += -DHFSPLUS_SUPER_MAGIC=0x482b
+endif
--- a/fs/aufs/module.c 1970-01-01 01:00:00.000000000 +0100
+++ b/fs/aufs/module.c 2012-01-10 02:15:56.557456016 +0000
@@ -0,0 +1,195 @@
+++ b/fs/aufs/module.c 2012-03-11 05:01:22.570973560 +0000
@@ -0,0 +1,196 @@
+/*
+ * Copyright (C) 2005-2012 Junjiro R. Okajima
+ *
@ -17091,8 +17120,9 @@
+{
+ int i;
+
+ /* including AuCache_HNOTIFY */
+ for (i = 0; i < AuCache_Last; i++)
+ /* excluding AuCache_HNOTIFY */
+ BUILD_BUG_ON(AuCache_HNOTIFY + 1 != AuCache_Last);
+ for (i = 0; i < AuCache_HNOTIFY; i++)
+ if (au_cachep[i]) {
+ kmem_cache_destroy(au_cachep[i]);
+ au_cachep[i] = NULL;
@ -17220,8 +17250,8 @@
+module_init(aufs_init);
+module_exit(aufs_exit);
--- a/fs/aufs/module.h 1970-01-01 01:00:00.000000000 +0100
+++ b/fs/aufs/module.h 2012-01-10 02:15:56.557456016 +0000
@@ -0,0 +1,107 @@
+++ b/fs/aufs/module.h 2012-03-11 05:01:22.570973560 +0000
@@ -0,0 +1,105 @@
+/*
+ * Copyright (C) 2005-2012 Junjiro R. Okajima
+ *
@ -17298,9 +17328,7 @@
+ AuCache_FINFO,
+ AuCache_VDIR,
+ AuCache_DEHSTR,
+#ifdef CONFIG_AUFS_HNOTIFY
+ AuCache_HNOTIFY,
+#endif
+ AuCache_HNOTIFY, /* must be last */
+ AuCache_Last
+};
+
@ -23962,8 +23990,8 @@
+ return 0;
+}
--- a/fs/aufs/vfsub.c 1970-01-01 01:00:00.000000000 +0100
+++ b/fs/aufs/vfsub.c 2012-01-10 02:15:56.569456073 +0000
@@ -0,0 +1,835 @@
+++ b/fs/aufs/vfsub.c 2012-03-11 05:01:22.570973560 +0000
@@ -0,0 +1,832 @@
+/*
+ * Copyright (C) 2005-2012 Junjiro R. Okajima
+ *
@ -24105,22 +24133,19 @@
+ */
+int vfsub_name_hash(const char *name, struct qstr *this, int len)
+{
+ unsigned long hash;
+ unsigned int c;
+
+ this->name = name;
+ this->len = len;
+ this->hash = full_name_hash(name, len);
+ if (!len)
+ return -EACCES;
+
+ hash = init_name_hash();
+ while (len--) {
+ c = *(const unsigned char *)name++;
+ if (c == '/' || c == '\0')
+ return -EACCES;
+ hash = partial_name_hash(c, hash);
+ }
+ this->hash = end_name_hash(hash);
+ return 0;
+}
+
@ -28468,7 +28493,7 @@
+ return err;
+}
--- a/include/linux/aufs_type.h 1970-01-01 01:00:00.000000000 +0100
+++ b/include/linux/aufs_type.h 2012-02-19 21:12:26.574427108 +0000
+++ b/include/linux/aufs_type.h 2012-03-11 05:01:22.570973560 +0000
@@ -0,0 +1,233 @@
+/*
+ * Copyright (C) 2005-2012 Junjiro R. Okajima
@ -28511,7 +28536,7 @@
+
+#include <linux/limits.h>
+
+#define AUFS_VERSION "3.x-rcN-20120123"
+#define AUFS_VERSION "3.x-rcN-20120312"
+
+/* todo? move this to linux-2.6.19/include/magic.h */
+#define AUFS_SUPER_MAGIC ('a' << 24 | 'u' << 16 | 'f' << 8 | 's')

View File

@ -1,10 +1,10 @@
aufs3.x-rcN base patch
diff --git a/fs/namei.c b/fs/namei.c
index c283a1e..586eccd 100644
index e2ba628..fde8ea2 100644
--- a/fs/namei.c
+++ b/fs/namei.c
@@ -1756,7 +1756,7 @@ static struct dentry *__lookup_hash(struct qstr *name,
@@ -1781,7 +1781,7 @@ static struct dentry *__lookup_hash(struct qstr *name,
* needs parent already locked. Doesn't follow mounts.
* SMP-safe.
*/

View File

@ -14,7 +14,7 @@ index 20002e3..6d792ad 100644
/*
diff --git a/fs/inode.c b/fs/inode.c
index 4fa4f09..f07a146 100644
index d3ebdbe..6db6251 100644
--- a/fs/inode.c
+++ b/fs/inode.c
@@ -66,6 +66,7 @@ static struct hlist_head *inode_hashtable __read_mostly;
@ -26,10 +26,10 @@ index 4fa4f09..f07a146 100644
/*
* Empty aops. Can be used for the cases where the user does not
diff --git a/fs/namei.c b/fs/namei.c
index 586eccd..62dd0a8 100644
index fde8ea2..62f2302 100644
--- a/fs/namei.c
+++ b/fs/namei.c
@@ -1760,6 +1760,7 @@ struct dentry *lookup_hash(struct nameidata *nd)
@@ -1785,6 +1785,7 @@ struct dentry *lookup_hash(struct nameidata *nd)
{
return __lookup_hash(&nd->last, nd->path.dentry, nd);
}