aufs: Update to aufs3.x-rcN-20130722

svn path=/dists/trunk/linux/; revision=20405
This commit is contained in:
Ben Hutchings 2013-07-22 04:19:54 +00:00
parent 1669b35019
commit 0afc9c2c5c
6 changed files with 254 additions and 192 deletions

3
debian/changelog vendored
View File

@ -2,6 +2,9 @@ linux (3.11~rc2-1~exp1) UNRELEASED; urgency=low
* New upstream release candidate
[ Ben Hutchings ]
* aufs: Update to aufs3.x-rcN-20130722
-- Ben Hutchings <ben@decadent.org.uk> Mon, 22 Jul 2013 04:18:31 +0100
linux (3.10.1-1) unstable; urgency=low

View File

@ -1,7 +1,7 @@
From: J. R. Okajima <hooanon05@yahoo.co.jp>
Date: Sat May 18 10:36:30 2013 +0900
Subject: aufs3.x-rcN-20130520
Origin: http://sourceforge.net/p/aufs/aufs3-standalone/ci/4f14cef47eb7c23eda7198931fbab1040866b6ee/tree/
Date: Fri Jul 19 11:54:34 2013 +0900
Subject: aufs3.x-rcN-20130722
Origin: http://sourceforge.net/p/aufs/aufs3-standalone/ci/2482fbbf640a326afc454d78ace7a266a05c39d4/tree/
Bug-Debian: http://bugs.debian.org/541828
Patch generated by debian/patches/features/all/aufs3/gen-patch
@ -87,8 +87,8 @@ Patch generated by debian/patches/features/all/aufs3/gen-patch
+ When the aufs mount option 'noxino' is specified, it
+ will be empty. About XINO files, see the aufs manual.
--- a/Documentation/filesystems/aufs/README 1970-01-01 01:00:00.000000000 +0100
+++ b/Documentation/filesystems/aufs/README 2013-06-02 18:23:34.749538984 +0100
@@ -0,0 +1,345 @@
+++ b/Documentation/filesystems/aufs/README 2013-07-22 05:16:41.115119378 +0100
@@ -0,0 +1,346 @@
+
+Aufs3 -- advanced multi layered unification filesystem version 3.x
+http://aufs.sf.net
@ -417,6 +417,7 @@ Patch generated by debian/patches/features/all/aufs3/gen-patch
+POIRETTE Marc made a donation (2013/4).
+Alessandro Gorreta made a donation (2013/4).
+lauri kasvandik made a donation (2013/5).
+pemasu from Finland made a donation (2013/7).
+
+Thank you very much.
+Donations are always, including future donations, very important and
@ -1715,7 +1716,7 @@ Patch generated by debian/patches/features/all/aufs3/gen-patch
+#endif /* __KERNEL__ */
+#endif /* __AUFS_H__ */
--- a/fs/aufs/branch.c 1970-01-01 01:00:00.000000000 +0100
+++ b/fs/aufs/branch.c 2013-06-02 18:23:34.749538984 +0100
+++ b/fs/aufs/branch.c 2013-07-22 05:16:41.115119378 +0100
@@ -0,0 +1,1213 @@
+/*
+ * Copyright (C) 2005-2013 Junjiro R. Okajima
@ -2330,7 +2331,7 @@ Patch generated by debian/patches/features/all/aufs3/gen-patch
+ ndentry = dpage->ndentry;
+ for (j = 0; !err && j < ndentry; j++) {
+ d = dpage->dentries[j];
+ AuDebugOn(!d->d_count);
+ AuDebugOn(!d_count(d));
+ if (!au_digen_test(d, sigen)) {
+ di_read_lock_child(d, AuLock_IR);
+ if (unlikely(au_dbrange_test(d))) {
@ -3230,8 +3231,8 @@ Patch generated by debian/patches/features/all/aufs3/gen-patch
+
+-include ${srctree}/${src}/conf_priv.mk
--- a/fs/aufs/cpup.c 1970-01-01 01:00:00.000000000 +0100
+++ b/fs/aufs/cpup.c 2013-06-02 18:23:34.749538984 +0100
@@ -0,0 +1,1228 @@
+++ b/fs/aufs/cpup.c 2013-07-22 05:16:41.115119378 +0100
@@ -0,0 +1,1247 @@
+/*
+ * Copyright (C) 2005-2013 Junjiro R. Okajima
+ *
@ -3261,7 +3262,7 @@ Patch generated by debian/patches/features/all/aufs3/gen-patch
+void au_cpup_attr_flags(struct inode *dst, unsigned int iflags)
+{
+ const unsigned int mask = S_DEAD | S_SWAPFILE | S_PRIVATE
+ | S_NOATIME | S_NOCMTIME;
+ | S_NOATIME | S_NOCMTIME | S_AUTOMOUNT;
+
+ BUILD_BUG_ON(sizeof(iflags) != sizeof(dst->i_flags));
+
@ -4181,6 +4182,25 @@ Patch generated by debian/patches/features/all/aufs3/gen-patch
+ return err;
+}
+
+/* generalized cpup_simple() with h_open_pre/post() calls */
+int au_sio_cpup_simple_h_open(struct dentry *dentry, aufs_bindex_t bdst,
+ loff_t len, unsigned int flags,
+ struct au_pin *pin, aufs_bindex_t bsrc)
+{
+ int err;
+ struct file *h_file;
+
+ h_file = au_h_open_pre(dentry, bsrc);
+ if (IS_ERR(h_file))
+ err = PTR_ERR(h_file);
+ else {
+ err = au_sio_cpup_simple(dentry, bdst, len, flags, pin);
+ au_h_open_post(dentry, bsrc, h_file);
+ }
+
+ return err;
+}
+
+/* ---------------------------------------------------------------------- */
+
+/*
@ -4461,8 +4481,8 @@ Patch generated by debian/patches/features/all/aufs3/gen-patch
+ return err;
+}
--- a/fs/aufs/cpup.h 1970-01-01 01:00:00.000000000 +0100
+++ b/fs/aufs/cpup.h 2013-06-02 18:23:34.749538984 +0100
@@ -0,0 +1,84 @@
+++ b/fs/aufs/cpup.h 2013-07-22 05:16:41.115119378 +0100
@@ -0,0 +1,87 @@
+/*
+ * Copyright (C) 2005-2013 Junjiro R. Okajima
+ *
@ -4522,6 +4542,9 @@ Patch generated by debian/patches/features/all/aufs3/gen-patch
+ struct dentry *dst_parent, struct au_pin *pin);
+int au_sio_cpup_simple(struct dentry *dentry, aufs_bindex_t bdst, loff_t len,
+ unsigned int flags, struct au_pin *pin);
+int au_sio_cpup_simple_h_open(struct dentry *dentry, aufs_bindex_t bdst,
+ loff_t len, unsigned int flags,
+ struct au_pin *pin, aufs_bindex_t bsrc);
+int au_sio_cpup_wh(struct dentry *dentry, aufs_bindex_t bdst, loff_t len,
+ struct file *file, struct au_pin *pin);
+
@ -5036,7 +5059,7 @@ Patch generated by debian/patches/features/all/aufs3/gen-patch
+#endif /* __KERNEL__ */
+#endif /* __DBGAUFS_H__ */
--- a/fs/aufs/dcsub.c 1970-01-01 01:00:00.000000000 +0100
+++ b/fs/aufs/dcsub.c 2013-03-10 01:48:58.459093058 +0000
+++ b/fs/aufs/dcsub.c 2013-07-22 05:16:41.115119378 +0100
@@ -0,0 +1,243 @@
+/*
+ * Copyright (C) 2005-2013 Junjiro R. Okajima
@ -5138,7 +5161,7 @@ Patch generated by debian/patches/features/all/aufs3/gen-patch
+ dpages->ndpage++;
+ }
+
+ AuDebugOn(!dentry->d_count);
+ AuDebugOn(!d_count(dentry));
+ dpage->dentries[dpage->ndentry++] = dget_dlock(dentry);
+ return 0; /* success */
+
@ -5164,7 +5187,7 @@ Patch generated by debian/patches/features/all/aufs3/gen-patch
+ if (this_parent->d_sb == sb
+ && !IS_ROOT(this_parent)
+ && au_di(this_parent)
+ && this_parent->d_count
+ && d_count(this_parent)
+ && (!test || test(this_parent, arg))) {
+ err = au_dpages_append(dpages, this_parent, GFP_ATOMIC);
+ if (unlikely(err))
@ -5178,7 +5201,7 @@ Patch generated by debian/patches/features/all/aufs3/gen-patch
+
+ next = tmp->next;
+ spin_lock_nested(&dentry->d_lock, DENTRY_D_LOCK_NESTED);
+ if (dentry->d_count) {
+ if (d_count(dentry)) {
+ if (!list_empty(&dentry->d_subdirs)) {
+ spin_unlock(&this_parent->d_lock);
+ spin_release(&dentry->d_lock.dep_map, 1,
@ -5229,7 +5252,7 @@ Patch generated by debian/patches/features/all/aufs3/gen-patch
+ write_seqlock(&rename_lock);
+ spin_lock(&dentry->d_lock);
+ if (do_include
+ && dentry->d_count
+ && d_count(dentry)
+ && (!test || test(dentry, arg)))
+ err = au_dpages_append(dpages, dentry, GFP_ATOMIC);
+ spin_unlock(&dentry->d_lock);
@ -5243,7 +5266,7 @@ Patch generated by debian/patches/features/all/aufs3/gen-patch
+ while (!IS_ROOT(dentry)) {
+ dentry = dentry->d_parent; /* rename_lock is locked */
+ spin_lock(&dentry->d_lock);
+ if (dentry->d_count
+ if (d_count(dentry)
+ && (!test || test(dentry, arg)))
+ err = au_dpages_append(dpages, dentry, GFP_ATOMIC);
+ spin_unlock(&dentry->d_lock);
@ -5379,7 +5402,7 @@ Patch generated by debian/patches/features/all/aufs3/gen-patch
+#endif /* __KERNEL__ */
+#endif /* __AUFS_DCSUB_H__ */
--- a/fs/aufs/debug.c 1970-01-01 01:00:00.000000000 +0100
+++ b/fs/aufs/debug.c 2013-06-02 18:23:34.749538984 +0100
+++ b/fs/aufs/debug.c 2013-07-22 05:16:41.115119378 +0100
@@ -0,0 +1,491 @@
+/*
+ * Copyright (C) 2005-2013 Junjiro R. Okajima
@ -5542,7 +5565,7 @@ Patch generated by debian/patches/features/all/aufs3/gen-patch
+ bindex,
+ AuDLNPair(dentry->d_parent), AuDLNPair(dentry),
+ dentry->d_sb ? au_sbtype(dentry->d_sb) : "??",
+ dentry->d_count, dentry->d_flags);
+ d_count(dentry), dentry->d_flags);
+ hn = -1;
+ if (bindex >= 0 && dentry->d_inode && au_test_aufs(dentry->d_sb)) {
+ struct au_iinfo *iinfo = au_ii(dentry->d_inode);
@ -7423,7 +7446,7 @@ Patch generated by debian/patches/features/all/aufs3/gen-patch
+#endif /* __KERNEL__ */
+#endif /* __AUFS_DENTRY_H__ */
--- a/fs/aufs/dinfo.c 1970-01-01 01:00:00.000000000 +0100
+++ b/fs/aufs/dinfo.c 2013-03-10 01:48:58.459093058 +0000
+++ b/fs/aufs/dinfo.c 2013-07-22 05:16:41.115119378 +0100
@@ -0,0 +1,543 @@
+/*
+ * Copyright (C) 2005-2013 Junjiro R. Okajima
@ -7745,7 +7768,7 @@ Patch generated by debian/patches/features/all/aufs3/gen-patch
+ return NULL;
+ AuDebugOn(bindex < 0);
+ d = au_di(dentry)->di_hdentry[0 + bindex].hd_dentry;
+ AuDebugOn(d && d->d_count <= 0);
+ AuDebugOn(d && d_count(d) <= 0);
+ return d;
+}
+
@ -7969,8 +7992,8 @@ Patch generated by debian/patches/features/all/aufs3/gen-patch
+ return -1;
+}
--- a/fs/aufs/dir.c 1970-01-01 01:00:00.000000000 +0100
+++ b/fs/aufs/dir.c 2013-06-02 18:23:34.749538984 +0100
@@ -0,0 +1,630 @@
+++ b/fs/aufs/dir.c 2013-07-22 05:16:41.115119378 +0100
@@ -0,0 +1,645 @@
+/*
+ * Copyright (C) 2005-2013 Junjiro R. Okajima
+ *
@ -8006,6 +8029,7 @@ Patch generated by debian/patches/features/all/aufs3/gen-patch
+ nlink += h_dir->i_nlink - 2;
+ if (h_dir->i_nlink < 2)
+ nlink += 2;
+ smp_mb();
+ /* 0 can happen in revaliding */
+ set_nlink(dir, nlink);
+}
@ -8020,6 +8044,7 @@ Patch generated by debian/patches/features/all/aufs3/gen-patch
+ nlink -= h_dir->i_nlink - 2;
+ if (h_dir->i_nlink < 2)
+ nlink -= 2;
+ smp_mb();
+ /* nlink == 0 means the branch-fs is broken */
+ set_nlink(dir, nlink);
+}
@ -8329,13 +8354,16 @@ Patch generated by debian/patches/features/all/aufs3/gen-patch
+
+/* ---------------------------------------------------------------------- */
+
+static int aufs_readdir(struct file *file, void *dirent, filldir_t filldir)
+static int aufs_iterate(struct file *file, struct dir_context *ctx)
+{
+ int err;
+ struct dentry *dentry;
+ struct inode *inode, *h_inode;
+ struct super_block *sb;
+
+ AuDbg("%.*s, ctx{%pf, %llu}\n",
+ AuDLNPair(file->f_dentry), ctx->actor, ctx->pos);
+
+ dentry = file->f_dentry;
+ inode = dentry->d_inode;
+ IMustLock(inode);
@ -8354,7 +8382,7 @@ Patch generated by debian/patches/features/all/aufs3/gen-patch
+
+ h_inode = au_h_iptr(inode, au_ibstart(inode));
+ if (!au_test_nfsd()) {
+ err = au_vdir_fill_de(file, dirent, filldir);
+ err = au_vdir_fill_de(file, ctx);
+ fsstack_copy_attr_atime(inode, h_inode);
+ } else {
+ /*
@ -8364,7 +8392,7 @@ Patch generated by debian/patches/features/all/aufs3/gen-patch
+ atomic_inc(&h_inode->i_count);
+ di_read_unlock(dentry, AuLock_IR);
+ si_read_unlock(sb);
+ err = au_vdir_fill_de(file, dirent, filldir);
+ err = au_vdir_fill_de(file, ctx);
+ fsstack_copy_attr_atime(inode, h_inode);
+ fi_write_unlock(file);
+ iput(h_inode);
@ -8398,17 +8426,19 @@ Patch generated by debian/patches/features/all/aufs3/gen-patch
+#endif
+
+struct test_empty_arg {
+ struct dir_context ctx;
+ struct au_nhash *whlist;
+ unsigned int flags;
+ int err;
+ aufs_bindex_t bindex;
+};
+
+static int test_empty_cb(void *__arg, const char *__name, int namelen,
+ loff_t offset __maybe_unused, u64 ino,
+static int test_empty_cb(struct dir_context *ctx, const char *__name,
+ int namelen, loff_t offset __maybe_unused, u64 ino,
+ unsigned int d_type)
+{
+ struct test_empty_arg *arg = __arg;
+ struct test_empty_arg *arg = container_of(ctx, struct test_empty_arg,
+ ctx);
+ char *name = (void *)__name;
+
+ arg->err = 0;
@ -8460,7 +8490,7 @@ Patch generated by debian/patches/features/all/aufs3/gen-patch
+ arg->err = 0;
+ au_fclr_testempty(arg->flags, CALLED);
+ /* smp_mb(); */
+ err = vfsub_readdir(h_file, test_empty_cb, arg);
+ err = vfsub_iterate_dir(h_file, &arg->ctx);
+ if (err >= 0)
+ err = arg->err;
+ } while (!err && au_ftest_testempty(arg->flags, CALLED));
@ -8521,7 +8551,11 @@ Patch generated by debian/patches/features/all/aufs3/gen-patch
+ unsigned int rdhash;
+ aufs_bindex_t bindex, bstart, btail;
+ struct au_nhash whlist;
+ struct test_empty_arg arg;
+ struct test_empty_arg arg = {
+ .ctx = {
+ .actor = au_diractor(test_empty_cb)
+ }
+ };
+
+ SiMustAnyLock(dentry->d_sb);
+
@ -8563,7 +8597,11 @@ Patch generated by debian/patches/features/all/aufs3/gen-patch
+int au_test_empty(struct dentry *dentry, struct au_nhash *whlist)
+{
+ int err;
+ struct test_empty_arg arg;
+ struct test_empty_arg arg = {
+ .ctx = {
+ .actor = au_diractor(test_empty_cb)
+ }
+ };
+ aufs_bindex_t bindex, btail;
+
+ err = 0;
@ -8591,7 +8629,7 @@ Patch generated by debian/patches/features/all/aufs3/gen-patch
+ .owner = THIS_MODULE,
+ .llseek = default_llseek,
+ .read = generic_read_dir,
+ .readdir = aufs_readdir,
+ .iterate = aufs_iterate,
+ .unlocked_ioctl = aufs_ioctl_dir,
+#ifdef CONFIG_COMPAT
+ .compat_ioctl = aufs_compat_ioctl_dir,
@ -8602,7 +8640,7 @@ Patch generated by debian/patches/features/all/aufs3/gen-patch
+ .fsync = aufs_fsync_dir
+};
--- a/fs/aufs/dir.h 1970-01-01 01:00:00.000000000 +0100
+++ b/fs/aufs/dir.h 2013-03-10 01:48:58.459093058 +0000
+++ b/fs/aufs/dir.h 2013-07-22 05:16:41.115119378 +0100
@@ -0,0 +1,137 @@
+/*
+ * Copyright (C) 2005-2013 Junjiro R. Okajima
@ -8712,7 +8750,7 @@ Patch generated by debian/patches/features/all/aufs3/gen-patch
+ unsigned char shwh);
+void au_vdir_free(struct au_vdir *vdir);
+int au_vdir_init(struct file *file);
+int au_vdir_fill_de(struct file *file, void *dirent, filldir_t filldir);
+int au_vdir_fill_de(struct file *file, struct dir_context *ctx);
+
+/* ioctl.c */
+long aufs_ioctl_dir(struct file *file, unsigned int cmd, unsigned long arg);
@ -8742,8 +8780,8 @@ Patch generated by debian/patches/features/all/aufs3/gen-patch
+#endif /* __KERNEL__ */
+#endif /* __AUFS_DIR_H__ */
--- a/fs/aufs/dynop.c 1970-01-01 01:00:00.000000000 +0100
+++ b/fs/aufs/dynop.c 2013-06-02 18:23:34.749538984 +0100
@@ -0,0 +1,379 @@
+++ b/fs/aufs/dynop.c 2013-07-22 05:16:41.115119378 +0100
@@ -0,0 +1,380 @@
+/*
+ * Copyright (C) 2010-2013 Junjiro R. Okajima
+ *
@ -8939,6 +8977,7 @@ Patch generated by debian/patches/features/all/aufs3/gen-patch
+ DySetAop(migratepage);
+ DySetAop(launder_page);
+ DySetAop(is_partially_uptodate);
+ DySetAop(is_dirty_writeback);
+ DySetAop(error_remove_page);
+ DySetAop(swap_activate);
+ DySetAop(swap_deactivate);
@ -9203,8 +9242,8 @@ Patch generated by debian/patches/features/all/aufs3/gen-patch
+#endif /* __KERNEL__ */
+#endif /* __AUFS_DYNOP_H__ */
--- a/fs/aufs/export.c 1970-01-01 01:00:00.000000000 +0100
+++ b/fs/aufs/export.c 2013-06-02 18:23:34.749538984 +0100
@@ -0,0 +1,826 @@
+++ b/fs/aufs/export.c 2013-07-22 05:16:41.119119378 +0100
@@ -0,0 +1,832 @@
+/*
+ * Copyright (C) 2005-2013 Junjiro R. Okajima
+ *
@ -9548,6 +9587,7 @@ Patch generated by debian/patches/features/all/aufs3/gen-patch
+}
+
+struct find_name_by_ino {
+ struct dir_context ctx;
+ int called, found;
+ ino_t ino;
+ char *name;
@ -9555,10 +9595,11 @@ Patch generated by debian/patches/features/all/aufs3/gen-patch
+};
+
+static int
+find_name_by_ino(void *arg, const char *name, int namelen, loff_t offset,
+ u64 ino, unsigned int d_type)
+find_name_by_ino(struct dir_context *ctx, const char *name, int namelen,
+ loff_t offset, u64 ino, unsigned int d_type)
+{
+ struct find_name_by_ino *a = arg;
+ struct find_name_by_ino *a = container_of(ctx, struct find_name_by_ino,
+ ctx);
+
+ a->called++;
+ if (a->ino != ino)
@ -9576,7 +9617,11 @@ Patch generated by debian/patches/features/all/aufs3/gen-patch
+ struct dentry *dentry, *parent;
+ struct file *file;
+ struct inode *dir;
+ struct find_name_by_ino arg;
+ struct find_name_by_ino arg = {
+ .ctx = {
+ .actor = au_diractor(find_name_by_ino)
+ }
+ };
+ int err;
+
+ parent = path->dentry;
@ -9596,7 +9641,7 @@ Patch generated by debian/patches/features/all/aufs3/gen-patch
+ do {
+ arg.called = 0;
+ /* smp_mb(); */
+ err = vfsub_readdir(file, find_name_by_ino, &arg);
+ err = vfsub_iterate_dir(file, &arg.ctx);
+ } while (!err && !arg.found && arg.called);
+ dentry = ERR_PTR(err);
+ if (unlikely(err))
@ -10032,7 +10077,7 @@ Patch generated by debian/patches/features/all/aufs3/gen-patch
+ atomic_set(&sbinfo->si_xigen_next, u);
+}
--- a/fs/aufs/f_op.c 1970-01-01 01:00:00.000000000 +0100
+++ b/fs/aufs/f_op.c 2013-06-02 18:23:34.753538984 +0100
+++ b/fs/aufs/f_op.c 2013-07-22 05:16:41.119119378 +0100
@@ -0,0 +1,721 @@
+/*
+ * Copyright (C) 2005-2013 Junjiro R. Okajima
@ -10474,7 +10519,7 @@ Patch generated by debian/patches/features/all/aufs3/gen-patch
+ * It means that when aufs acquires si_rwsem for write, the process should never
+ * acquire mmap_sem.
+ *
+ * Actually aufs_readdir() holds [fdi]i_rwsem before mmap_sem, but this is not a
+ * Actually aufs_iterate() holds [fdi]i_rwsem before mmap_sem, but this is not a
+ * problem either since any directory is not able to be mmap-ed.
+ * The similar scenario is applied to aufs_readlink() too.
+ */
@ -11135,8 +11180,8 @@ Patch generated by debian/patches/features/all/aufs3/gen-patch
+ return ret;
+}
--- a/fs/aufs/file.c 1970-01-01 01:00:00.000000000 +0100
+++ b/fs/aufs/file.c 2013-06-02 18:23:34.753538984 +0100
@@ -0,0 +1,688 @@
+++ b/fs/aufs/file.c 2013-07-22 05:16:41.119119378 +0100
@@ -0,0 +1,694 @@
+/*
+ * Copyright (C) 2005-2013 Junjiro R. Okajima
+ *
@ -11551,10 +11596,11 @@ Patch generated by debian/patches/features/all/aufs3/gen-patch
+ /* always superio. */
+ err = au_pin(&pin, dentry, bstart, AuOpt_UDBA_NONE,
+ AuPin_DI_LOCKED | AuPin_MNT_WRITE);
+ if (!err)
+ if (!err) {
+ err = au_sio_cpup_simple(dentry, bstart, -1,
+ AuCpup_DTIME, &pin);
+ au_unpin(&pin);
+ au_unpin(&pin);
+ }
+ } else if (hi_wh) {
+ /* already copied-up after unlink */
+ err = au_reopen_wh(file, bstart, hi_wh);
@ -11780,7 +11826,8 @@ Patch generated by debian/patches/features/all/aufs3/gen-patch
+
+static int aufs_set_page_dirty(struct page *page)
+{ AuUnsupport(); return 0; }
+static void aufs_invalidatepage(struct page *page, unsigned long offset)
+static void aufs_invalidatepage(struct page *page, unsigned int offset,
+ unsigned int length)
+{ AuUnsupport(); }
+static int aufs_releasepage(struct page *page, gfp_t gfp)
+{ AuUnsupport(); return 0; }
@ -11793,6 +11840,9 @@ Patch generated by debian/patches/features/all/aufs3/gen-patch
+ read_descriptor_t *desc,
+ unsigned long from)
+{ AuUnsupport(); return 0; }
+static void aufs_is_dirty_writeback(struct page *page, bool *dirty,
+ bool *writeback)
+{ AuUnsupport(); }
+static int aufs_error_remove_page(struct address_space *mapping,
+ struct page *page)
+{ AuUnsupport(); return 0; }
@ -11820,6 +11870,7 @@ Patch generated by debian/patches/features/all/aufs3/gen-patch
+ .migratepage = aufs_migratepage,
+ .launder_page = aufs_launder_page,
+ .is_partially_uptodate = aufs_is_partially_uptodate,
+ .is_dirty_writeback = aufs_is_dirty_writeback,
+ .error_remove_page = aufs_error_remove_page,
+ .swap_activate = aufs_swap_activate,
+ .swap_deactivate = aufs_swap_deactivate
@ -13138,7 +13189,7 @@ Patch generated by debian/patches/features/all/aufs3/gen-patch
+ }
+}
--- a/fs/aufs/hnotify.c 1970-01-01 01:00:00.000000000 +0100
+++ b/fs/aufs/hnotify.c 2013-06-02 18:23:34.753538984 +0100
+++ b/fs/aufs/hnotify.c 2013-07-22 05:16:41.119119378 +0100
@@ -0,0 +1,712 @@
+/*
+ * Copyright (C) 2005-2013 Junjiro R. Okajima
@ -13530,7 +13581,7 @@ Patch generated by debian/patches/features/all/aufs3/gen-patch
+ au_digen_dec(d);
+ else
+ goto cont_unlock;
+ if (d->d_count) {
+ if (d_count(d)) {
+ dentry = dget_dlock(d);
+ spin_unlock(&d->d_lock);
+ break;
@ -13853,8 +13904,8 @@ Patch generated by debian/patches/features/all/aufs3/gen-patch
+ au_hn_destroy_cache();
+}
--- a/fs/aufs/i_op.c 1970-01-01 01:00:00.000000000 +0100
+++ b/fs/aufs/i_op.c 2013-06-02 18:23:34.753538984 +0100
@@ -0,0 +1,1107 @@
+++ b/fs/aufs/i_op.c 2013-07-22 05:16:41.119119378 +0100
@@ -0,0 +1,1100 @@
+/*
+ * Copyright (C) 2005-2013 Junjiro R. Okajima
+ *
@ -14487,7 +14538,6 @@ Patch generated by debian/patches/features/all/aufs3/gen-patch
+ aufs_bindex_t bstart, ibstart;
+ struct dentry *hi_wh, *parent;
+ struct inode *inode;
+ struct file *h_file;
+ struct au_wr_dir_args wr_dir_args = {
+ .force_btgt = -1,
+ .flags = 0
@ -14529,7 +14579,6 @@ Patch generated by debian/patches/features/all/aufs3/gen-patch
+ sz = ia->ia_size;
+ mutex_unlock(&a->h_inode->i_mutex);
+
+ h_file = NULL;
+ hi_wh = NULL;
+ if (au_ftest_icpup(a->flags, DID_CPUP) && d_unlinked(dentry)) {
+ hi_wh = au_hi_wh(inode, a->btgt);
@ -14553,14 +14602,8 @@ Patch generated by debian/patches/features/all/aufs3/gen-patch
+ goto out; /* success */
+
+ if (!d_unhashed(dentry)) {
+ h_file = au_h_open_pre(dentry, bstart);
+ if (IS_ERR(h_file))
+ err = PTR_ERR(h_file);
+ else {
+ err = au_sio_cpup_simple(dentry, a->btgt, sz,
+ AuCpup_DTIME, &a->pin);
+ au_h_open_post(dentry, bstart, h_file);
+ }
+ err = au_sio_cpup_simple_h_open(dentry, a->btgt, sz,
+ AuCpup_DTIME, &a->pin, bstart);
+ if (!err)
+ a->h_path.dentry = au_h_dptr(dentry, a->btgt);
+ } else if (!hi_wh)
@ -14711,6 +14754,7 @@ Patch generated by debian/patches/features/all/aufs3/gen-patch
+ n = inode->i_nlink;
+ n -= nlink;
+ n += st->nlink;
+ smp_mb();
+ /* 0 can happen */
+ set_nlink(inode, n);
+ }
@ -14963,8 +15007,8 @@ Patch generated by debian/patches/features/all/aufs3/gen-patch
+ .update_time = aufs_update_time
+};
--- a/fs/aufs/i_op_add.c 1970-01-01 01:00:00.000000000 +0100
+++ b/fs/aufs/i_op_add.c 2013-06-02 18:23:34.753538984 +0100
@@ -0,0 +1,722 @@
+++ b/fs/aufs/i_op_add.c 2013-07-22 05:16:41.119119378 +0100
@@ -0,0 +1,716 @@
+/*
+ * Copyright (C) 2005-2013 Junjiro R. Okajima
+ *
@ -15326,7 +15370,6 @@ Patch generated by debian/patches/features/all/aufs3/gen-patch
+{
+ int err;
+ struct dentry *h_src_dentry;
+ struct file *h_file;
+
+ di_read_lock_parent(a->src_parent, AuLock_IR);
+ err = au_test_and_cpup_dirs(src_dentry, a->bdst);
@ -15339,15 +15382,10 @@ Patch generated by debian/patches/features/all/aufs3/gen-patch
+ AuPin_DI_LOCKED | AuPin_MNT_WRITE);
+ if (unlikely(err))
+ goto out;
+ h_file = au_h_open_pre(src_dentry, a->bsrc);
+ if (IS_ERR(h_file))
+ err = PTR_ERR(h_file);
+ else {
+ err = au_sio_cpup_simple(src_dentry, a->bdst, -1,
+ AuCpup_DTIME /* | AuCpup_KEEPLINO */,
+ &a->pin);
+ au_h_open_post(src_dentry, a->bsrc, h_file);
+ }
+
+ err = au_sio_cpup_simple_h_open(src_dentry, a->bdst, -1,
+ AuCpup_DTIME /* | AuCpup_KEEPLINO */,
+ &a->pin, a->bsrc);
+ au_unpin(&a->pin);
+
+out:
@ -16168,8 +16206,8 @@ Patch generated by debian/patches/features/all/aufs3/gen-patch
+ return err;
+}
--- a/fs/aufs/i_op_ren.c 1970-01-01 01:00:00.000000000 +0100
+++ b/fs/aufs/i_op_ren.c 2013-06-02 18:23:34.753538984 +0100
@@ -0,0 +1,1053 @@
+++ b/fs/aufs/i_op_ren.c 2013-07-22 05:16:41.119119378 +0100
@@ -0,0 +1,1045 @@
+/*
+ * Copyright (C) 2005-2013 Junjiro R. Okajima
+ *
@ -17133,26 +17171,18 @@ Patch generated by debian/patches/features/all/aufs3/gen-patch
+
+ /* cpup src */
+ if (a->src_bstart != a->btgt) {
+ struct file *h_file;
+ struct au_pin pin;
+
+ err = au_pin(&pin, a->src_dentry, a->btgt,
+ au_opt_udba(a->src_dentry->d_sb),
+ AuPin_DI_LOCKED | AuPin_MNT_WRITE);
+ if (unlikely(err))
+ goto out_children;
+
+ AuDebugOn(au_dbstart(a->src_dentry) != a->src_bstart);
+ h_file = au_h_open_pre(a->src_dentry, a->src_bstart);
+ if (IS_ERR(h_file)) {
+ err = PTR_ERR(h_file);
+ h_file = NULL;
+ } else {
+ err = au_sio_cpup_simple(a->src_dentry, a->btgt, -1,
+ AuCpup_DTIME, &pin);
+ au_h_open_post(a->src_dentry, a->src_bstart, h_file);
+ if (!err) {
+ AuDebugOn(au_dbstart(a->src_dentry) != a->src_bstart);
+ err = au_sio_cpup_simple_h_open(a->src_dentry, a->btgt,
+ -1, AuCpup_DTIME, &pin,
+ a->src_bstart);
+ au_unpin(&pin);
+ }
+ au_unpin(&pin);
+ if (unlikely(err))
+ goto out_children;
+ a->src_bstart = a->btgt;
@ -18800,8 +18830,8 @@ Patch generated by debian/patches/features/all/aufs3/gen-patch
+#endif
+#endif
--- a/fs/aufs/loop.c 1970-01-01 01:00:00.000000000 +0100
+++ b/fs/aufs/loop.c 2013-06-02 18:23:34.753538984 +0100
@@ -0,0 +1,135 @@
+++ b/fs/aufs/loop.c 2013-07-22 05:16:41.119119378 +0100
@@ -0,0 +1,134 @@
+/*
+ * Copyright (C) 2005-2013 Junjiro R. Okajima
+ *
@ -18824,7 +18854,6 @@ Patch generated by debian/patches/features/all/aufs3/gen-patch
+ * support for loopback block device as a branch
+ */
+
+#include <linux/loop.h>
+#include "aufs.h"
+
+/*
@ -18833,14 +18862,14 @@ Patch generated by debian/patches/features/all/aufs3/gen-patch
+int au_test_loopback_overlap(struct super_block *sb, struct dentry *h_adding)
+{
+ struct super_block *h_sb;
+ struct loop_device *l;
+ struct file *backing_file;
+
+ h_sb = h_adding->d_sb;
+ if (MAJOR(h_sb->s_dev) != LOOP_MAJOR)
+ backing_file = loop_backing_file(h_sb);
+ if (!backing_file)
+ return 0;
+
+ l = h_sb->s_bdev->bd_disk->private_data;
+ h_adding = l->lo_backing_file->f_dentry;
+ h_adding = backing_file->f_dentry;
+ /*
+ * h_adding can be local NFS.
+ * in this case aufs cannot detect the loop.
@ -18938,8 +18967,8 @@ Patch generated by debian/patches/features/all/aufs3/gen-patch
+ kfree(au_warn_loopback_array);
+}
--- a/fs/aufs/loop.h 1970-01-01 01:00:00.000000000 +0100
+++ b/fs/aufs/loop.h 2013-03-10 01:48:58.463093058 +0000
@@ -0,0 +1,50 @@
+++ b/fs/aufs/loop.h 2013-07-22 05:16:41.119119378 +0100
@@ -0,0 +1,53 @@
+/*
+ * Copyright (C) 2005-2013 Junjiro R. Okajima
+ *
@ -18971,6 +19000,9 @@ Patch generated by debian/patches/features/all/aufs3/gen-patch
+struct super_block;
+
+#ifdef CONFIG_AUFS_BDEV_LOOP
+/* drivers/block/loop.c */
+struct file *loop_backing_file(struct super_block *sb);
+
+/* loop.c */
+int au_test_loopback_overlap(struct super_block *sb, struct dentry *h_adding);
+int au_test_loopback_kthread(void);
@ -22029,8 +22061,8 @@ Patch generated by debian/patches/features/all/aufs3/gen-patch
+ return err;
+}
--- a/fs/aufs/rdu.c 1970-01-01 01:00:00.000000000 +0100
+++ b/fs/aufs/rdu.c 2013-05-04 18:39:11.239157326 +0100
@@ -0,0 +1,384 @@
+++ b/fs/aufs/rdu.c 2013-07-22 05:16:41.119119378 +0100
@@ -0,0 +1,389 @@
+/*
+ * Copyright (C) 2005-2013 Junjiro R. Okajima
+ *
@ -22069,6 +22101,7 @@ Patch generated by debian/patches/features/all/aufs3/gen-patch
+ do { (flags) &= ~AuRdu_##name; } while (0)
+
+struct au_rdu_arg {
+ struct dir_context ctx;
+ struct aufs_rdu *rdu;
+ union au_rdu_ent_ul ent;
+ unsigned long end;
@ -22077,11 +22110,11 @@ Patch generated by debian/patches/features/all/aufs3/gen-patch
+ int err;
+};
+
+static int au_rdu_fill(void *__arg, const char *name, int nlen,
+static int au_rdu_fill(struct dir_context *ctx, const char *name, int nlen,
+ loff_t offset, u64 h_ino, unsigned int d_type)
+{
+ int err, len;
+ struct au_rdu_arg *arg = __arg;
+ struct au_rdu_arg *arg = container_of(ctx, struct au_rdu_arg, ctx);
+ struct aufs_rdu *rdu = arg->rdu;
+ struct au_rdu_ent ent;
+
@ -22139,7 +22172,7 @@ Patch generated by debian/patches/features/all/aufs3/gen-patch
+ arg->err = 0;
+ au_fclr_rdu(cookie->flags, CALLED);
+ /* smp_mb(); */
+ err = vfsub_readdir(h_file, au_rdu_fill, arg);
+ err = vfsub_iterate_dir(h_file, &arg->ctx);
+ if (err >= 0)
+ err = arg->err;
+ } while (!err
@ -22156,7 +22189,11 @@ Patch generated by debian/patches/features/all/aufs3/gen-patch
+{
+ int err;
+ aufs_bindex_t bend;
+ struct au_rdu_arg arg;
+ struct au_rdu_arg arg = {
+ .ctx = {
+ .actor = au_diractor(au_rdu_fill)
+ }
+ };
+ struct dentry *dentry;
+ struct inode *inode;
+ struct file *h_file;
@ -22177,7 +22214,7 @@ Patch generated by debian/patches/features/all/aufs3/gen-patch
+ arg.end += rdu->sz;
+
+ err = -ENOTDIR;
+ if (unlikely(!file->f_op || !file->f_op->readdir))
+ if (unlikely(!file->f_op || !file->f_op->iterate))
+ goto out;
+
+ err = security_file_permission(file, MAY_READ);
@ -25253,8 +25290,8 @@ Patch generated by debian/patches/features/all/aufs3/gen-patch
+ pr_err("err %d (ignored)\n", err);
+}
--- a/fs/aufs/vdir.c 1970-01-01 01:00:00.000000000 +0100
+++ b/fs/aufs/vdir.c 2013-06-02 18:23:34.753538984 +0100
@@ -0,0 +1,878 @@
+++ b/fs/aufs/vdir.c 2013-07-22 05:16:41.119119378 +0100
@@ -0,0 +1,888 @@
+/*
+ * Copyright (C) 2005-2013 Junjiro R. Okajima
+ *
@ -25694,6 +25731,7 @@ Patch generated by debian/patches/features/all/aufs3/gen-patch
+#endif
+
+struct fillvdir_arg {
+ struct dir_context ctx;
+ struct file *file;
+ struct au_vdir *vdir;
+ struct au_nhash delist;
@ -25703,11 +25741,11 @@ Patch generated by debian/patches/features/all/aufs3/gen-patch
+ int err;
+};
+
+static int fillvdir(void *__arg, const char *__name, int nlen,
+static int fillvdir(struct dir_context *ctx, const char *__name, int nlen,
+ loff_t offset __maybe_unused, u64 h_ino,
+ unsigned int d_type)
+{
+ struct fillvdir_arg *arg = __arg;
+ struct fillvdir_arg *arg = container_of(ctx, struct fillvdir_arg, ctx);
+ char *name = (void *)__name;
+ struct super_block *sb;
+ ino_t ino;
@ -25855,10 +25893,15 @@ Patch generated by debian/patches/features/all/aufs3/gen-patch
+ arg->err = 0;
+ au_fclr_fillvdir(arg->flags, CALLED);
+ /* smp_mb(); */
+ err = vfsub_readdir(hf, fillvdir, arg);
+ err = vfsub_iterate_dir(hf, &arg->ctx);
+ if (err >= 0)
+ err = arg->err;
+ } while (!err && au_ftest_fillvdir(arg->flags, CALLED));
+
+ /*
+ * dir_relax() may be good for concurrency, but aufs should not
+ * use it since it will cause a lockdep problem.
+ */
+ }
+
+ if (!err && shwh)
@ -25877,7 +25920,11 @@ Patch generated by debian/patches/features/all/aufs3/gen-patch
+ int err;
+ unsigned long expire;
+ unsigned char do_read;
+ struct fillvdir_arg arg;
+ struct fillvdir_arg arg = {
+ .ctx = {
+ .actor = au_diractor(fillvdir)
+ }
+ };
+ struct inode *inode;
+ struct au_vdir *vdir, *allocated;
+
@ -25914,7 +25961,7 @@ Patch generated by debian/patches/features/all/aufs3/gen-patch
+ arg.vdir = vdir;
+ err = au_do_read_vdir(&arg);
+ if (!err) {
+ /* file->f_pos = 0; */
+ /* file->f_pos = 0; */ /* todo: ctx->pos? */
+ vdir->vd_version = inode->i_version;
+ vdir->vd_last.ul = 0;
+ vdir->vd_last.p.deblk = vdir->vd_deblk[0];
@ -25987,6 +26034,7 @@ Patch generated by debian/patches/features/all/aufs3/gen-patch
+ struct inode *inode;
+ struct au_vdir *vdir_cache, *allocated;
+
+ /* test file->f_pos here instead of ctx->pos */
+ err = read_vdir(file, !file->f_pos);
+ if (unlikely(err))
+ goto out;
@ -26000,6 +26048,7 @@ Patch generated by debian/patches/features/all/aufs3/gen-patch
+ goto out;
+ allocated = vdir_cache;
+ } else if (!file->f_pos && vdir_cache->vd_version != file->f_version) {
+ /* test file->f_pos here instead of ctx->pos */
+ err = reinit_vdir(vdir_cache);
+ if (unlikely(err))
+ goto out;
@ -26031,7 +26080,7 @@ Patch generated by debian/patches/features/all/aufs3/gen-patch
+}
+
+/* returns true or false */
+static int seek_vdir(struct file *file)
+static int seek_vdir(struct file *file, struct dir_context *ctx)
+{
+ int valid;
+ unsigned int deblk_sz;
@ -26044,17 +26093,17 @@ Patch generated by debian/patches/features/all/aufs3/gen-patch
+ vdir_cache = au_fvdir_cache(file);
+ offset = calc_offset(vdir_cache);
+ AuDbg("offset %lld\n", offset);
+ if (file->f_pos == offset)
+ if (ctx->pos == offset)
+ goto out;
+
+ vdir_cache->vd_last.ul = 0;
+ vdir_cache->vd_last.p.deblk = vdir_cache->vd_deblk[0];
+ if (!file->f_pos)
+ if (!ctx->pos)
+ goto out;
+
+ valid = 0;
+ deblk_sz = vdir_cache->vd_deblk_sz;
+ ul = div64_u64(file->f_pos, deblk_sz);
+ ul = div64_u64(ctx->pos, deblk_sz);
+ AuDbg("ul %lu\n", ul);
+ if (ul >= vdir_cache->vd_nblk)
+ goto out;
@ -26065,7 +26114,7 @@ Patch generated by debian/patches/features/all/aufs3/gen-patch
+ deblk_end.deblk = p.deblk + deblk_sz;
+ offset = ul;
+ offset *= deblk_sz;
+ while (!is_deblk_end(&p, &deblk_end) && offset < file->f_pos) {
+ while (!is_deblk_end(&p, &deblk_end) && offset < ctx->pos) {
+ unsigned int l;
+
+ l = calc_size(p.de->de_str.len);
@ -26086,16 +26135,15 @@ Patch generated by debian/patches/features/all/aufs3/gen-patch
+ return valid;
+}
+
+int au_vdir_fill_de(struct file *file, void *dirent, filldir_t filldir)
+int au_vdir_fill_de(struct file *file, struct dir_context *ctx)
+{
+ int err;
+ unsigned int l, deblk_sz;
+ union au_vdir_deblk_p deblk_end;
+ struct au_vdir *vdir_cache;
+ struct au_vdir_de *de;
+
+ vdir_cache = au_fvdir_cache(file);
+ if (!seek_vdir(file))
+ if (!seek_vdir(file, ctx))
+ return 0;
+
+ deblk_sz = vdir_cache->vd_deblk_sz;
@ -26105,12 +26153,11 @@ Patch generated by debian/patches/features/all/aufs3/gen-patch
+ while (!is_deblk_end(&vdir_cache->vd_last.p, &deblk_end)) {
+ de = vdir_cache->vd_last.p.de;
+ AuDbg("%.*s, off%lld, i%lu, dt%d\n",
+ de->de_str.len, de->de_str.name, file->f_pos,
+ de->de_str.len, de->de_str.name, ctx->pos,
+ (unsigned long)de->de_ino, de->de_type);
+ err = filldir(dirent, de->de_str.name, de->de_str.len,
+ file->f_pos, de->de_ino, de->de_type);
+ if (unlikely(err)) {
+ AuTraceErr(err);
+ if (unlikely(!dir_emit(ctx, de->de_str.name,
+ de->de_str.len, de->de_ino,
+ de->de_type))) {
+ /* todo: ignore the error caused by udba? */
+ /* return err; */
+ return 0;
@ -26118,13 +26165,13 @@ Patch generated by debian/patches/features/all/aufs3/gen-patch
+
+ l = calc_size(de->de_str.len);
+ vdir_cache->vd_last.p.deblk += l;
+ file->f_pos += l;
+ ctx->pos += l;
+ }
+ if (vdir_cache->vd_last.ul < vdir_cache->vd_nblk - 1) {
+ vdir_cache->vd_last.ul++;
+ vdir_cache->vd_last.p.deblk
+ = vdir_cache->vd_deblk[vdir_cache->vd_last.ul];
+ file->f_pos = deblk_sz * vdir_cache->vd_last.ul;
+ ctx->pos = deblk_sz * vdir_cache->vd_last.ul;
+ continue;
+ }
+ break;
@ -26134,8 +26181,8 @@ Patch generated by debian/patches/features/all/aufs3/gen-patch
+ return 0;
+}
--- a/fs/aufs/vfsub.c 1970-01-01 01:00:00.000000000 +0100
+++ b/fs/aufs/vfsub.c 2013-06-02 18:23:34.753538984 +0100
@@ -0,0 +1,769 @@
+++ b/fs/aufs/vfsub.c 2013-07-22 05:16:41.119119378 +0100
@@ -0,0 +1,772 @@
+/*
+ * Copyright (C) 2005-2013 Junjiro R. Okajima
+ *
@ -26614,12 +26661,15 @@ Patch generated by debian/patches/features/all/aufs3/gen-patch
+ return err;
+}
+
+int vfsub_readdir(struct file *file, filldir_t filldir, void *arg)
+int vfsub_iterate_dir(struct file *file, struct dir_context *ctx)
+{
+ int err;
+
+ AuDbg("%.*s, ctx{%pf, %llu}\n",
+ AuDLNPair(file->f_dentry), ctx->actor, ctx->pos);
+
+ lockdep_off();
+ err = vfs_readdir(file, filldir, arg);
+ err = iterate_dir(file, ctx);
+ lockdep_on();
+ if (err >= 0)
+ vfsub_update_h_iattr(&file->f_path, /*did*/NULL); /*ignore*/
@ -26845,7 +26895,7 @@ Patch generated by debian/patches/features/all/aufs3/gen-patch
+ struct dentry *d = a->path->dentry;
+ struct inode *h_inode;
+ const int stop_sillyrename = (au_test_nfs(d->d_sb)
+ && d->d_count == 1);
+ && d_count(d) == 1);
+
+ IMustLock(a->dir);
+
@ -26906,8 +26956,8 @@ Patch generated by debian/patches/features/all/aufs3/gen-patch
+ return err;
+}
--- a/fs/aufs/vfsub.h 1970-01-01 01:00:00.000000000 +0100
+++ b/fs/aufs/vfsub.h 2013-06-02 18:23:34.753538984 +0100
@@ -0,0 +1,294 @@
+++ b/fs/aufs/vfsub.h 2013-07-22 05:16:41.119119378 +0100
@@ -0,0 +1,303 @@
+/*
+ * Copyright (C) 2005-2013 Junjiro R. Okajima
+ *
@ -27091,7 +27141,16 @@ Patch generated by debian/patches/features/all/aufs3/gen-patch
+ssize_t vfsub_write_k(struct file *file, void *kbuf, size_t count,
+ loff_t *ppos);
+int vfsub_flush(struct file *file, fl_owner_t id);
+int vfsub_readdir(struct file *file, filldir_t filldir, void *arg);
+int vfsub_iterate_dir(struct file *file, struct dir_context *ctx);
+
+/* just for type-check */
+static inline filldir_t au_diractor(int (*func)(struct dir_context *,
+ const char *, int, loff_t, u64,
+ unsigned))
+{
+ return (filldir_t)func;
+}
+
+
+static inline loff_t vfsub_f_size_read(struct file *file)
+{
@ -30622,7 +30681,7 @@ Patch generated by debian/patches/features/all/aufs3/gen-patch
+
+#include <uapi/linux/aufs_type.h>
--- a/include/uapi/linux/aufs_type.h 1970-01-01 01:00:00.000000000 +0100
+++ b/include/uapi/linux/aufs_type.h 2013-06-02 18:23:34.757538984 +0100
+++ b/include/uapi/linux/aufs_type.h 2013-07-22 05:16:41.123119378 +0100
@@ -0,0 +1,235 @@
+/*
+ * Copyright (C) 2005-2013 Junjiro R. Okajima
@ -30666,7 +30725,7 @@ Patch generated by debian/patches/features/all/aufs3/gen-patch
+
+#include <linux/limits.h>
+
+#define AUFS_VERSION "3.x-rcN-20130520"
+#define AUFS_VERSION "3.x-rcN-20130722"
+
+/* 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,7 +1,7 @@
From: J. R. Okajima <hooanon05@yahoo.co.jp>
Date: Sat May 18 10:36:30 2013 +0900
Date: Fri Jul 19 11:54:34 2013 +0900
Subject: aufs3.x-rcN base patch
Origin: http://sourceforge.net/p/aufs/aufs3-standalone/ci/4f14cef47eb7c23eda7198931fbab1040866b6ee/tree/
Origin: http://sourceforge.net/p/aufs/aufs3-standalone/ci/2482fbbf640a326afc454d78ace7a266a05c39d4/tree/
Bug-Debian: http://bugs.debian.org/541828
Patch headers added by debian/patches/features/all/aufs3/gen-patch
@ -9,7 +9,7 @@ Patch headers added by debian/patches/features/all/aufs3/gen-patch
aufs3.x-rcN base patch
diff --git a/fs/file_table.c b/fs/file_table.c
index cd4d87a..ca5948f 100644
index b44e4c5..aa91109 100644
--- a/fs/file_table.c
+++ b/fs/file_table.c
@@ -36,7 +36,7 @@ struct files_stat_struct files_stat = {
@ -22,10 +22,10 @@ index cd4d87a..ca5948f 100644
/* SLAB cache for file structures */
static struct kmem_cache *filp_cachep __read_mostly;
diff --git a/fs/inode.c b/fs/inode.c
index 00d5fc3..f324521 100644
index d6dfb09..cc35712 100644
--- a/fs/inode.c
+++ b/fs/inode.c
@@ -1498,7 +1498,7 @@ static int relatime_need_update(struct vfsmount *mnt, struct inode *inode,
@@ -1500,7 +1500,7 @@ static int relatime_need_update(struct vfsmount *mnt, struct inode *inode,
* This does the actual work of updating an inodes time or version. Must have
* had called mnt_want_write() before calling this.
*/
@ -35,7 +35,7 @@ index 00d5fc3..f324521 100644
if (inode->i_op->update_time)
return inode->i_op->update_time(inode, time, flags);
diff --git a/fs/splice.c b/fs/splice.c
index e6b2559..e4082c6 100644
index 3b7ee65..e147583 100644
--- a/fs/splice.c
+++ b/fs/splice.c
@@ -1093,8 +1093,8 @@ EXPORT_SYMBOL(generic_splice_sendpage);
@ -49,7 +49,7 @@ index e6b2559..e4082c6 100644
{
ssize_t (*splice_write)(struct pipe_inode_info *, struct file *,
loff_t *, size_t, unsigned int);
@@ -1124,9 +1124,9 @@ static long do_splice_from(struct pipe_inode_info *pipe, struct file *out,
@@ -1110,9 +1110,9 @@ static long do_splice_from(struct pipe_inode_info *pipe, struct file *out,
/*
* Attempt to initiate a splice from a file to a pipe.
*/
@ -63,10 +63,10 @@ index e6b2559..e4082c6 100644
ssize_t (*splice_read)(struct file *, loff_t *,
struct pipe_inode_info *, size_t, unsigned int);
diff --git a/include/linux/fs.h b/include/linux/fs.h
index 43db02e..59b6e6e 100644
index 9818747..146f304 100644
--- a/include/linux/fs.h
+++ b/include/linux/fs.h
@@ -2576,6 +2576,7 @@ extern int inode_change_ok(const struct inode *, struct iattr *);
@@ -2589,6 +2589,7 @@ extern int inode_change_ok(const struct inode *, struct iattr *);
extern int inode_newsize_ok(const struct inode *, loff_t offset);
extern void setattr_copy(struct inode *inode, const struct iattr *attr);
@ -75,10 +75,10 @@ index 43db02e..59b6e6e 100644
extern int generic_show_options(struct seq_file *m, struct dentry *root);
diff --git a/include/linux/splice.h b/include/linux/splice.h
index 09a545a..1ac5727 100644
index 74575cb..bfc6fb6 100644
--- a/include/linux/splice.h
+++ b/include/linux/splice.h
@@ -91,4 +91,10 @@ extern void splice_shrink_spd(struct splice_pipe_desc *);
@@ -92,4 +92,10 @@ extern void splice_shrink_spd(struct splice_pipe_desc *);
extern void spd_release_page(struct splice_pipe_desc *, unsigned int);
extern const struct pipe_buf_operations page_cache_pipe_buf_ops;

View File

@ -1,7 +1,7 @@
From: J. R. Okajima <hooanon05@yahoo.co.jp>
Date: Fri May 10 00:27:35 2013 +0900
Date: Fri Jul 19 11:54:34 2013 +0900
Subject: aufs3.x-rcN kbuild patch
Origin: http://sourceforge.net/p/aufs/aufs3-standalone/ci/4f14cef47eb7c23eda7198931fbab1040866b6ee/tree/
Origin: http://sourceforge.net/p/aufs/aufs3-standalone/ci/2482fbbf640a326afc454d78ace7a266a05c39d4/tree/
Bug-Debian: http://bugs.debian.org/541828
Patch headers added by debian/patches/features/all/aufs3/gen-patch
@ -30,7 +30,7 @@ index 4fe6df3..4a57676 100644
obj-$(CONFIG_EFIVAR_FS) += efivarfs/
+obj-$(CONFIG_AUFS_FS) += aufs/
diff --git a/include/uapi/linux/Kbuild b/include/uapi/linux/Kbuild
index ab5d499..ed438c0 100644
index 997f9f2..ede7bad 100644
--- a/include/uapi/linux/Kbuild
+++ b/include/uapi/linux/Kbuild
@@ -56,6 +56,7 @@ header-y += atmppp.h

View File

@ -1,7 +1,7 @@
From: J. R. Okajima <hooanon05@yahoo.co.jp>
Date: Fri May 10 00:27:35 2013 +0900
Date: Fri Jul 19 11:54:34 2013 +0900
Subject: aufs3.x-rcN standalone patch
Origin: http://sourceforge.net/p/aufs/aufs3-standalone/ci/4f14cef47eb7c23eda7198931fbab1040866b6ee/tree/
Origin: http://sourceforge.net/p/aufs/aufs3-standalone/ci/2482fbbf640a326afc454d78ace7a266a05c39d4/tree/
Bug-Debian: http://bugs.debian.org/541828
Patch headers added by debian/patches/features/all/aufs3/gen-patch
@ -9,7 +9,7 @@ Patch headers added by debian/patches/features/all/aufs3/gen-patch
aufs3.x-rcN standalone patch
diff --git a/fs/file_table.c b/fs/file_table.c
index ca5948f..b553610 100644
index aa91109..ab2f3c3 100644
--- a/fs/file_table.c
+++ b/fs/file_table.c
@@ -37,6 +37,7 @@ struct files_stat_struct files_stat = {
@ -20,7 +20,7 @@ index ca5948f..b553610 100644
/* SLAB cache for file structures */
static struct kmem_cache *filp_cachep __read_mostly;
@@ -404,6 +405,8 @@ void file_sb_list_del(struct file *file)
@@ -406,6 +407,8 @@ void file_sb_list_del(struct file *file)
}
}
@ -30,7 +30,7 @@ index ca5948f..b553610 100644
/*
diff --git a/fs/inode.c b/fs/inode.c
index f324521..bff7670 100644
index cc35712..16e2667 100644
--- a/fs/inode.c
+++ b/fs/inode.c
@@ -56,6 +56,7 @@ static struct hlist_head *inode_hashtable __read_mostly;
@ -41,7 +41,7 @@ index f324521..bff7670 100644
/*
* Empty aops. Can be used for the cases where the user does not
@@ -1514,6 +1515,7 @@ int update_time(struct inode *inode, struct timespec *time, int flags)
@@ -1516,6 +1517,7 @@ int update_time(struct inode *inode, struct timespec *time, int flags)
mark_inode_dirty_sync(inode);
return 0;
}
@ -114,10 +114,10 @@ index bd2625b..2ff2a0f 100644
int fsnotify_fasync(int fd, struct file *file, int on)
{
diff --git a/fs/notify/mark.c b/fs/notify/mark.c
index fc6b49b..a6bb87d 100644
index 923fe4a..176b435 100644
--- a/fs/notify/mark.c
+++ b/fs/notify/mark.c
@@ -115,6 +115,7 @@ void fsnotify_put_mark(struct fsnotify_mark *mark)
@@ -109,6 +109,7 @@ void fsnotify_put_mark(struct fsnotify_mark *mark)
mark->free_mark(mark);
}
}
@ -125,7 +125,7 @@ index fc6b49b..a6bb87d 100644
/*
* Any time a mark is getting freed we end up here.
@@ -197,6 +198,7 @@ void fsnotify_destroy_mark(struct fsnotify_mark *mark,
@@ -191,6 +192,7 @@ void fsnotify_destroy_mark(struct fsnotify_mark *mark,
fsnotify_destroy_mark_locked(mark, group);
mutex_unlock(&group->mark_mutex);
}
@ -133,7 +133,7 @@ index fc6b49b..a6bb87d 100644
void fsnotify_set_mark_mask_locked(struct fsnotify_mark *mark, __u32 mask)
{
@@ -281,6 +283,7 @@ err:
@@ -275,6 +277,7 @@ err:
return ret;
}
@ -141,7 +141,7 @@ index fc6b49b..a6bb87d 100644
int fsnotify_add_mark(struct fsnotify_mark *mark, struct fsnotify_group *group,
struct inode *inode, struct vfsmount *mnt, int allow_dups)
@@ -342,6 +345,7 @@ void fsnotify_init_mark(struct fsnotify_mark *mark,
@@ -336,6 +339,7 @@ void fsnotify_init_mark(struct fsnotify_mark *mark,
atomic_set(&mark->refcnt, 1);
mark->free_mark = free_mark;
}
@ -150,7 +150,7 @@ index fc6b49b..a6bb87d 100644
static int fsnotify_mark_destroy(void *ignored)
{
diff --git a/fs/open.c b/fs/open.c
index 8c74100..be563cd 100644
index 9156cb0..bcaf4ea 100644
--- a/fs/open.c
+++ b/fs/open.c
@@ -61,6 +61,7 @@ int do_truncate(struct dentry *dentry, loff_t length, unsigned int time_attrs,
@ -162,18 +162,18 @@ index 8c74100..be563cd 100644
long vfs_truncate(struct path *path, loff_t length)
{
diff --git a/fs/splice.c b/fs/splice.c
index e4082c6..2d1a9fc 100644
index e147583..789f6b2 100644
--- a/fs/splice.c
+++ b/fs/splice.c
@@ -1120,6 +1120,7 @@ long do_splice_from(struct pipe_inode_info *pipe, struct file *out,
file_end_write(out);
return ret;
@@ -1106,6 +1106,7 @@ long do_splice_from(struct pipe_inode_info *pipe, struct file *out,
return splice_write(pipe, out, ppos, len, flags);
}
+EXPORT_SYMBOL_GPL(do_splice_from);
/*
* Attempt to initiate a splice from a file to a pipe.
@@ -1146,6 +1147,7 @@ long do_splice_to(struct file *in, loff_t *ppos,
@@ -1132,6 +1133,7 @@ long do_splice_to(struct file *in, loff_t *ppos,
return splice_read(in, ppos, pipe, len, flags);
}
@ -198,7 +198,7 @@ index c44b6fe..d78b003 100644
}
+EXPORT_SYMBOL_GPL(cap_mmap_file);
diff --git a/security/device_cgroup.c b/security/device_cgroup.c
index dd0dc57..9760ecb6 100644
index e8aad69..5f3baa6 100644
--- a/security/device_cgroup.c
+++ b/security/device_cgroup.c
@@ -7,6 +7,7 @@
@ -209,7 +209,7 @@ index dd0dc57..9760ecb6 100644
#include <linux/list.h>
#include <linux/uaccess.h>
#include <linux/seq_file.h>
@@ -789,6 +790,7 @@ int __devcgroup_inode_permission(struct inode *inode, int mask)
@@ -769,6 +770,7 @@ int __devcgroup_inode_permission(struct inode *inode, int mask)
return __devcgroup_check_permission(type, imajor(inode), iminor(inode),
access);
}
@ -218,10 +218,10 @@ index dd0dc57..9760ecb6 100644
int devcgroup_inode_mknod(int mode, dev_t dev)
{
diff --git a/security/security.c b/security/security.c
index a3dce87..06a6ea6 100644
index 94b35ae..42ab55a 100644
--- a/security/security.c
+++ b/security/security.c
@@ -396,6 +396,7 @@ int security_path_rmdir(struct path *dir, struct dentry *dentry)
@@ -409,6 +409,7 @@ int security_path_rmdir(struct path *dir, struct dentry *dentry)
return 0;
return security_ops->path_rmdir(dir, dentry);
}
@ -229,7 +229,7 @@ index a3dce87..06a6ea6 100644
int security_path_unlink(struct path *dir, struct dentry *dentry)
{
@@ -412,6 +413,7 @@ int security_path_symlink(struct path *dir, struct dentry *dentry,
@@ -425,6 +426,7 @@ int security_path_symlink(struct path *dir, struct dentry *dentry,
return 0;
return security_ops->path_symlink(dir, dentry, old_name);
}
@ -237,7 +237,7 @@ index a3dce87..06a6ea6 100644
int security_path_link(struct dentry *old_dentry, struct path *new_dir,
struct dentry *new_dentry)
@@ -420,6 +422,7 @@ int security_path_link(struct dentry *old_dentry, struct path *new_dir,
@@ -433,6 +435,7 @@ int security_path_link(struct dentry *old_dentry, struct path *new_dir,
return 0;
return security_ops->path_link(old_dentry, new_dir, new_dentry);
}
@ -245,7 +245,7 @@ index a3dce87..06a6ea6 100644
int security_path_rename(struct path *old_dir, struct dentry *old_dentry,
struct path *new_dir, struct dentry *new_dentry)
@@ -438,6 +441,7 @@ int security_path_truncate(struct path *path)
@@ -451,6 +454,7 @@ int security_path_truncate(struct path *path)
return 0;
return security_ops->path_truncate(path);
}
@ -253,7 +253,7 @@ index a3dce87..06a6ea6 100644
int security_path_chmod(struct path *path, umode_t mode)
{
@@ -445,6 +449,7 @@ int security_path_chmod(struct path *path, umode_t mode)
@@ -458,6 +462,7 @@ int security_path_chmod(struct path *path, umode_t mode)
return 0;
return security_ops->path_chmod(path, mode);
}
@ -261,7 +261,7 @@ index a3dce87..06a6ea6 100644
int security_path_chown(struct path *path, kuid_t uid, kgid_t gid)
{
@@ -452,6 +457,7 @@ int security_path_chown(struct path *path, kuid_t uid, kgid_t gid)
@@ -465,6 +470,7 @@ int security_path_chown(struct path *path, kuid_t uid, kgid_t gid)
return 0;
return security_ops->path_chown(path, uid, gid);
}
@ -269,7 +269,7 @@ index a3dce87..06a6ea6 100644
int security_path_chroot(struct path *path)
{
@@ -528,6 +534,7 @@ int security_inode_readlink(struct dentry *dentry)
@@ -541,6 +547,7 @@ int security_inode_readlink(struct dentry *dentry)
return 0;
return security_ops->inode_readlink(dentry);
}
@ -277,7 +277,7 @@ index a3dce87..06a6ea6 100644
int security_inode_follow_link(struct dentry *dentry, struct nameidata *nd)
{
@@ -542,6 +549,7 @@ int security_inode_permission(struct inode *inode, int mask)
@@ -555,6 +562,7 @@ int security_inode_permission(struct inode *inode, int mask)
return 0;
return security_ops->inode_permission(inode, mask);
}
@ -285,7 +285,7 @@ index a3dce87..06a6ea6 100644
int security_inode_setattr(struct dentry *dentry, struct iattr *attr)
{
@@ -663,6 +671,7 @@ int security_file_permission(struct file *file, int mask)
@@ -677,6 +685,7 @@ int security_file_permission(struct file *file, int mask)
return fsnotify_perm(file, mask);
}
@ -293,7 +293,7 @@ index a3dce87..06a6ea6 100644
int security_file_alloc(struct file *file)
{
@@ -723,6 +732,7 @@ int security_mmap_file(struct file *file, unsigned long prot,
@@ -737,6 +746,7 @@ int security_mmap_file(struct file *file, unsigned long prot,
return ret;
return ima_file_mmap(file, prot);
}

12
debian/patches/series vendored
View File

@ -19,14 +19,14 @@ bugfix/all/radeon-firmware-is-required-for-drm-and-kms-on-r600-onward.patch
# Patches and source files from aufs3 repository, imported with
# debian/patches/features/all/aufs3/gen-patch.
#features/all/aufs3/aufs3-base.patch
#features/all/aufs3/aufs3-standalone.patch
#features/all/aufs3/aufs3-kbuild.patch
#features/all/aufs3/aufs3-add.patch
features/all/aufs3/aufs3-base.patch
features/all/aufs3/aufs3-standalone.patch
features/all/aufs3/aufs3-kbuild.patch
features/all/aufs3/aufs3-add.patch
# mark as staging/crap
#debian/aufs3-mark-as-staging.patch
debian/aufs3-mark-as-staging.patch
# hide broken config option
#debian/AUFS_PROC_MAP-is-BROKEN.patch
debian/AUFS_PROC_MAP-is-BROKEN.patch
# Change some defaults for security reasons
features/all/sysrq-mask.patch