From b888e2c5a2abf3479c23683febcfe22abf8196ea Mon Sep 17 00:00:00 2001 From: Ben Hutchings Date: Wed, 7 Aug 2013 13:30:23 +0000 Subject: [PATCH] aufs: Update to aufs3.10-20130805 svn path=/dists/sid/linux/; revision=20452 --- debian/changelog | 1 + .../features/all/aufs3/aufs3-add.patch | 671 +++++++++--------- .../features/all/aufs3/aufs3-base.patch | 20 +- .../features/all/aufs3/aufs3-kbuild.patch | 10 +- .../features/all/aufs3/aufs3-standalone.patch | 14 +- 5 files changed, 358 insertions(+), 358 deletions(-) diff --git a/debian/changelog b/debian/changelog index 1f9584de9..fa72b5688 100644 --- a/debian/changelog +++ b/debian/changelog @@ -80,6 +80,7 @@ linux (3.10.5-1) UNRELEASED; urgency=low * [rt] genpatch.py: Accept missing series-rt * [rt] Update to 3.10.4-rt1 and reenable * [rt] genpatch.py: Fix parsing of upstream patches with no header + * aufs: Update to aufs3.10-20130805 -- Ben Hutchings Tue, 30 Jul 2013 18:09:20 +0200 diff --git a/debian/patches/features/all/aufs3/aufs3-add.patch b/debian/patches/features/all/aufs3/aufs3-add.patch index 903c60120..15108a6ac 100644 --- a/debian/patches/features/all/aufs3/aufs3-add.patch +++ b/debian/patches/features/all/aufs3/aufs3-add.patch @@ -1,13 +1,13 @@ From: J. R. Okajima -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 Aug 2 20:51:57 2013 +0900 +Subject: aufs3.10-20130805 +Origin: http://sourceforge.net/p/aufs/aufs3-standalone/ci/a1069fdacd4c7e2650d1616c172465c74260600f/tree/ Bug-Debian: http://bugs.debian.org/541828 Patch generated by debian/patches/features/all/aufs3/gen-patch --- a/Documentation/ABI/testing/debugfs-aufs 1970-01-01 01:00:00.000000000 +0100 -+++ b/Documentation/ABI/testing/debugfs-aufs 2013-06-02 18:23:34.749538984 +0100 ++++ b/Documentation/ABI/testing/debugfs-aufs 2013-06-02 19:23:34.749538984 +0200 @@ -0,0 +1,50 @@ +What: /debug/aufs/si_/ +Date: March 2009 @@ -60,7 +60,7 @@ 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/ABI/testing/sysfs-aufs 1970-01-01 01:00:00.000000000 +0100 -+++ b/Documentation/ABI/testing/sysfs-aufs 2012-01-10 02:15:56.000000000 +0000 ++++ b/Documentation/ABI/testing/sysfs-aufs 2012-01-10 03:15:56.000000000 +0100 @@ -0,0 +1,24 @@ +What: /sys/fs/aufs/si_/ +Date: March 2009 @@ -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-08-07 15:04:57.879008639 +0200 +@@ -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 @@ -435,7 +436,7 @@ Patch generated by debian/patches/features/all/aufs3/gen-patch +# mode: text; +# End: ; --- a/Documentation/filesystems/aufs/design/01intro.txt 1970-01-01 01:00:00.000000000 +0100 -+++ b/Documentation/filesystems/aufs/design/01intro.txt 2013-03-10 01:48:58.459093058 +0000 ++++ b/Documentation/filesystems/aufs/design/01intro.txt 2013-03-10 02:48:58.459093058 +0100 @@ -0,0 +1,162 @@ + +# Copyright (C) 2005-2013 Junjiro R. Okajima @@ -600,7 +601,7 @@ Patch generated by debian/patches/features/all/aufs3/gen-patch +helper, instead of doing in kernel space. Actually I am still thinking +about it. But currently I have implemented it in kernel space. --- a/Documentation/filesystems/aufs/design/02struct.txt 1970-01-01 01:00:00.000000000 +0100 -+++ b/Documentation/filesystems/aufs/design/02struct.txt 2013-03-10 01:48:58.459093058 +0000 ++++ b/Documentation/filesystems/aufs/design/02struct.txt 2013-03-10 02:48:58.459093058 +0100 @@ -0,0 +1,226 @@ + +# Copyright (C) 2005-2013 Junjiro R. Okajima @@ -829,7 +830,7 @@ Patch generated by debian/patches/features/all/aufs3/gen-patch +When the trigger systemcall does not update the timestamps of the parent +dir, aufs reverts it after copy-up. --- a/Documentation/filesystems/aufs/design/03lookup.txt 1970-01-01 01:00:00.000000000 +0100 -+++ b/Documentation/filesystems/aufs/design/03lookup.txt 2013-03-10 01:48:58.459093058 +0000 ++++ b/Documentation/filesystems/aufs/design/03lookup.txt 2013-03-10 02:48:58.459093058 +0100 @@ -0,0 +1,106 @@ + +# Copyright (C) 2005-2013 Junjiro R. Okajima @@ -938,7 +939,7 @@ Patch generated by debian/patches/features/all/aufs3/gen-patch + aufs performance when system surely hide the aufs branches from user, + by over-mounting something (or another method). --- a/Documentation/filesystems/aufs/design/04branch.txt 1970-01-01 01:00:00.000000000 +0100 -+++ b/Documentation/filesystems/aufs/design/04branch.txt 2013-03-10 01:48:58.459093058 +0000 ++++ b/Documentation/filesystems/aufs/design/04branch.txt 2013-03-10 02:48:58.459093058 +0100 @@ -0,0 +1,76 @@ + +# Copyright (C) 2005-2013 Junjiro R. Okajima @@ -1017,7 +1018,7 @@ Patch generated by debian/patches/features/all/aufs3/gen-patch + - a regular file on the branch is opened for write and there is no + same named entry on the upper branch. --- a/Documentation/filesystems/aufs/design/05wbr_policy.txt 1970-01-01 01:00:00.000000000 +0100 -+++ b/Documentation/filesystems/aufs/design/05wbr_policy.txt 2013-03-10 01:48:58.459093058 +0000 ++++ b/Documentation/filesystems/aufs/design/05wbr_policy.txt 2013-03-10 02:48:58.459093058 +0100 @@ -0,0 +1,65 @@ + +# Copyright (C) 2005-2013 Junjiro R. Okajima @@ -1085,7 +1086,7 @@ Patch generated by debian/patches/features/all/aufs3/gen-patch + one. If the selected branch is readonly, then aufs follows the + copyup policy. --- a/Documentation/filesystems/aufs/design/06mmap.txt 1970-01-01 01:00:00.000000000 +0100 -+++ b/Documentation/filesystems/aufs/design/06mmap.txt 2013-03-10 01:48:58.459093058 +0000 ++++ b/Documentation/filesystems/aufs/design/06mmap.txt 2013-03-10 02:48:58.459093058 +0100 @@ -0,0 +1,47 @@ + +# Copyright (C) 2005-2013 Junjiro R. Okajima @@ -1135,7 +1136,7 @@ Patch generated by debian/patches/features/all/aufs3/gen-patch +approach, aufs met a hard problem and I could not solve it without +switching the approach. --- a/Documentation/filesystems/aufs/design/07export.txt 1970-01-01 01:00:00.000000000 +0100 -+++ b/Documentation/filesystems/aufs/design/07export.txt 2013-03-10 01:48:58.459093058 +0000 ++++ b/Documentation/filesystems/aufs/design/07export.txt 2013-03-10 02:48:58.459093058 +0100 @@ -0,0 +1,59 @@ + +# Copyright (C) 2005-2013 Junjiro R. Okajima @@ -1197,7 +1198,7 @@ Patch generated by debian/patches/features/all/aufs3/gen-patch +- readdir(): call lockdep_on/off() because filldir in NFSD calls + lookup_one_len(), vfs_getattr(), encode_fh() and others. --- a/Documentation/filesystems/aufs/design/08shwh.txt 1970-01-01 01:00:00.000000000 +0100 -+++ b/Documentation/filesystems/aufs/design/08shwh.txt 2013-03-10 01:48:58.459093058 +0000 ++++ b/Documentation/filesystems/aufs/design/08shwh.txt 2013-03-10 02:48:58.459093058 +0100 @@ -0,0 +1,53 @@ + +# Copyright (C) 2005-2013 Junjiro R. Okajima @@ -1253,7 +1254,7 @@ Patch generated by debian/patches/features/all/aufs3/gen-patch +This new squashfs archive can be stored on the boot device and the +initramfs will use it to replace the old one at the next boot. --- a/Documentation/filesystems/aufs/design/10dynop.txt 1970-01-01 01:00:00.000000000 +0100 -+++ b/Documentation/filesystems/aufs/design/10dynop.txt 2013-03-10 01:48:58.459093058 +0000 ++++ b/Documentation/filesystems/aufs/design/10dynop.txt 2013-03-10 02:48:58.459093058 +0100 @@ -0,0 +1,47 @@ + +# Copyright (C) 2010-2013 Junjiro R. Okajima @@ -1303,7 +1304,7 @@ Patch generated by debian/patches/features/all/aufs3/gen-patch +Currently this approach is applied to file_operations and +vm_operations_struct for regular files only. --- a/Documentation/filesystems/aufs/design/99plan.txt 1970-01-01 01:00:00.000000000 +0100 -+++ b/Documentation/filesystems/aufs/design/99plan.txt 2013-03-10 01:48:58.459093058 +0000 ++++ b/Documentation/filesystems/aufs/design/99plan.txt 2013-03-10 02:48:58.459093058 +0100 @@ -0,0 +1,96 @@ + +# Copyright (C) 2005-2013 Junjiro R. Okajima @@ -1402,7 +1403,7 @@ Patch generated by debian/patches/features/all/aufs3/gen-patch +/new. +Otherwise from /new. --- a/fs/aufs/Kconfig 1970-01-01 01:00:00.000000000 +0100 -+++ b/fs/aufs/Kconfig 2013-06-02 18:23:34.749538984 +0100 ++++ b/fs/aufs/Kconfig 2013-08-07 15:04:57.883008639 +0200 @@ -0,0 +1,202 @@ +config AUFS_FS + tristate "Aufs (Advanced multi layered unification filesystem) support" @@ -1607,7 +1608,7 @@ Patch generated by debian/patches/features/all/aufs3/gen-patch + When aufs supports Magic SysRq, enabled automatically. +endif --- a/fs/aufs/Makefile 1970-01-01 01:00:00.000000000 +0100 -+++ b/fs/aufs/Makefile 2012-08-01 03:41:52.000000000 +0100 ++++ b/fs/aufs/Makefile 2012-08-01 04:41:52.000000000 +0200 @@ -0,0 +1,42 @@ + +include ${src}/magic.mk @@ -1652,7 +1653,7 @@ Patch generated by debian/patches/features/all/aufs3/gen-patch +aufs-$(CONFIG_AUFS_DEBUG) += debug.o +aufs-$(CONFIG_AUFS_MAGIC_SYSRQ) += sysrq.o --- a/fs/aufs/aufs.h 1970-01-01 01:00:00.000000000 +0100 -+++ b/fs/aufs/aufs.h 2013-03-10 01:48:58.459093058 +0000 ++++ b/fs/aufs/aufs.h 2013-03-10 02:48:58.459093058 +0100 @@ -0,0 +1,60 @@ +/* + * Copyright (C) 2005-2013 Junjiro R. Okajima @@ -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-08-07 15:04:57.883008639 +0200 @@ -0,0 +1,1213 @@ +/* + * Copyright (C) 2005-2013 Junjiro R. Okajima @@ -2931,7 +2932,7 @@ Patch generated by debian/patches/features/all/aufs3/gen-patch + return err; +} --- a/fs/aufs/branch.h 1970-01-01 01:00:00.000000000 +0100 -+++ b/fs/aufs/branch.h 2013-06-02 18:23:34.749538984 +0100 ++++ b/fs/aufs/branch.h 2013-08-07 15:04:57.883008639 +0200 @@ -0,0 +1,255 @@ +/* + * Copyright (C) 2005-2013 Junjiro R. Okajima @@ -3189,7 +3190,7 @@ Patch generated by debian/patches/features/all/aufs3/gen-patch +#endif /* __KERNEL__ */ +#endif /* __AUFS_BRANCH_H__ */ --- a/fs/aufs/conf.mk 1970-01-01 01:00:00.000000000 +0100 -+++ b/fs/aufs/conf.mk 2012-01-10 02:15:56.000000000 +0000 ++++ b/fs/aufs/conf.mk 2012-01-10 03:15:56.000000000 +0100 @@ -0,0 +1,38 @@ + +AuConfStr = CONFIG_AUFS_FS=${CONFIG_AUFS_FS} @@ -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-08-07 15:04:57.883008639 +0200 +@@ -0,0 +1,1232 @@ +/* + * 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)); + @@ -3579,13 +3580,6 @@ Patch generated by debian/patches/features/all/aufs3/gen-patch + return err; +} + -+/* internal use only */ -+struct au_cpup_basic { -+ struct dentry *dentry; -+ aufs_bindex_t bdst, bsrc; -+ loff_t len; -+}; -+ +/* + * to support a sparse file which is opened with O_APPEND, + * we need to close the file. @@ -4003,6 +3997,7 @@ Patch generated by debian/patches/features/all/aufs3/gen-patch + return err; +} + ++#if 0 /* unused */ +struct au_cpup_single_args { + int *errp; + struct au_cpup_basic *basic; @@ -4019,6 +4014,7 @@ Patch generated by debian/patches/features/all/aufs3/gen-patch + *a->errp = au_cpup_single(a->basic, a->flags, a->dst_parent, a->pin); + au_pin_hdir_release(a->pin); +} ++#endif + +/* + * prevent SIGXFSZ in copy-up. @@ -4059,26 +4055,20 @@ Patch generated by debian/patches/features/all/aufs3/gen-patch + return do_sio; +} + -+int au_sio_cpup_single(struct dentry *dentry, aufs_bindex_t bdst, -+ aufs_bindex_t bsrc, loff_t len, unsigned int flags, ++#if 0 /* unused */ ++int au_sio_cpup_single(struct au_cpup_basic *basic, unsigned int flags, + struct dentry *dst_parent, struct au_pin *pin) +{ + int err, wkq_err; + struct dentry *h_dentry; -+ struct au_cpup_basic basic = { -+ .dentry = dentry, -+ .bdst = bdst, -+ .bsrc = bsrc, -+ .len = len -+ }; + -+ h_dentry = au_h_dptr(dentry, bsrc); ++ h_dentry = au_h_dptr(basic->dentry, basic->bsrc); + if (!au_cpup_sio_test(pin, h_dentry->d_inode->i_mode)) -+ err = au_cpup_single(&basic, flags, dst_parent, pin); ++ err = au_cpup_single(basic, flags, dst_parent, pin); + else { + struct au_cpup_single_args args = { + .errp = &err, -+ .basic = &basic, ++ .basic = basic, + .flags = flags, + .dst_parent = dst_parent, + .pin = pin @@ -4090,44 +4080,44 @@ Patch generated by debian/patches/features/all/aufs3/gen-patch + + return err; +} ++#endif + +/* + * copyup the @dentry from the first active lower branch to @bdst, + * using au_cpup_single(). + */ -+static int au_cpup_simple(struct dentry *dentry, aufs_bindex_t bdst, loff_t len, -+ unsigned int flags, struct au_pin *pin) ++static int au_cpup_simple(struct au_cpup_basic *basic, unsigned int flags, ++ struct au_pin *pin) +{ + int err; + aufs_bindex_t bsrc, bend; -+ struct dentry *h_dentry; ++ struct dentry *dentry, *h_dentry; + ++ dentry = basic->dentry; + DiMustWriteLock(dentry); -+ bend = au_dbend(dentry); -+ for (bsrc = bdst + 1; bsrc <= bend; bsrc++) { -+ h_dentry = au_h_dptr(dentry, bsrc); -+ if (h_dentry) { -+ AuDebugOn(!h_dentry->d_inode); -+ break; -+ } -+ } -+ AuDebugOn(bsrc > bend); + -+ err = au_lkup_neg(dentry, bdst, /*wh*/1); ++ bend = au_dbend(dentry); ++ if (basic->bsrc < 0) { ++ for (bsrc = basic->bdst + 1; bsrc <= bend; bsrc++) { ++ h_dentry = au_h_dptr(dentry, bsrc); ++ if (h_dentry) { ++ AuDebugOn(!h_dentry->d_inode); ++ break; ++ } ++ } ++ AuDebugOn(bsrc > bend); ++ basic->bsrc = bsrc; ++ } ++ ++ err = au_lkup_neg(dentry, basic->bdst, /*wh*/1); + if (!err) { -+ struct au_cpup_basic basic = { -+ .dentry = dentry, -+ .bdst = bdst, -+ .bsrc = bsrc, -+ .len = len -+ }; -+ err = au_cpup_single(&basic, flags | AuCpup_RENAME, NULL, pin); ++ err = au_cpup_single(basic, flags | AuCpup_RENAME, NULL, pin); + if (!err) + return 0; /* success */ + + /* revert */ -+ au_set_h_dptr(dentry, bdst, NULL); -+ au_set_dbstart(dentry, bsrc); ++ au_set_h_dptr(dentry, basic->bdst, NULL); ++ au_set_dbstart(dentry, basic->bsrc); + } + + return err; @@ -4135,9 +4125,7 @@ Patch generated by debian/patches/features/all/aufs3/gen-patch + +struct au_cpup_simple_args { + int *errp; -+ struct dentry *dentry; -+ aufs_bindex_t bdst; -+ loff_t len; ++ struct au_cpup_basic *basic; + unsigned int flags; + struct au_pin *pin; +}; @@ -4147,28 +4135,37 @@ Patch generated by debian/patches/features/all/aufs3/gen-patch + struct au_cpup_simple_args *a = args; + + au_pin_hdir_acquire_nest(a->pin); -+ *a->errp = au_cpup_simple(a->dentry, a->bdst, a->len, a->flags, a->pin); ++ *a->errp = au_cpup_simple(a->basic, a->flags, a->pin); + au_pin_hdir_release(a->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(struct au_cpup_basic *basic, unsigned int flags, ++ struct au_pin *pin) +{ + int err, wkq_err; -+ struct dentry *parent; ++ struct dentry *dentry, *parent; ++ struct file *h_file; + struct inode *h_dir; + ++ dentry = basic->dentry; ++ h_file = NULL; ++ if (au_ftest_cpup(flags, HOPEN)) { ++ AuDebugOn(basic->bsrc < 0); ++ h_file = au_h_open_pre(dentry, basic->bsrc); ++ err = PTR_ERR(h_file); ++ if (IS_ERR(h_file)) ++ goto out; ++ } ++ + parent = dget_parent(dentry); -+ h_dir = au_h_iptr(parent->d_inode, bdst); ++ h_dir = au_h_iptr(parent->d_inode, basic->bdst); + if (!au_test_h_perm_sio(h_dir, MAY_EXEC | MAY_WRITE) + && !au_cpup_sio_test(pin, dentry->d_inode->i_mode)) -+ err = au_cpup_simple(dentry, bdst, len, flags, pin); ++ err = au_cpup_simple(basic, flags, pin); + else { + struct au_cpup_simple_args args = { + .errp = &err, -+ .dentry = dentry, -+ .bdst = bdst, -+ .len = len, ++ .basic = basic, + .flags = flags, + .pin = pin + }; @@ -4178,6 +4175,10 @@ Patch generated by debian/patches/features/all/aufs3/gen-patch + } + + dput(parent); ++ if (h_file) ++ au_h_open_post(dentry, basic->bsrc, h_file); ++ ++out: + return err; +} + @@ -4186,55 +4187,54 @@ Patch generated by debian/patches/features/all/aufs3/gen-patch +/* + * copyup the deleted file for writing. + */ -+static int au_do_cpup_wh(struct dentry *dentry, aufs_bindex_t bdst, -+ struct dentry *wh_dentry, struct file *file, -+ loff_t len, struct au_pin *pin) ++static int au_do_cpup_wh(struct au_cpup_basic *basic, struct dentry *wh_dentry, ++ struct file *file, struct au_pin *pin) +{ + int err; -+ struct au_cpup_basic basic = { -+ .dentry = dentry, -+ .bdst = bdst, -+ .bsrc = -1, -+ .len = len -+ }; -+ struct au_dinfo *dinfo; ++ aufs_bindex_t bsrc_orig; + struct dentry *h_d_dst, *h_d_start; ++ struct au_dinfo *dinfo; + struct au_hdentry *hdp; + -+ dinfo = au_di(dentry); ++ dinfo = au_di(basic->dentry); + AuRwMustWriteLock(&dinfo->di_rwsem); + -+ basic.bsrc = dinfo->di_bstart; ++ bsrc_orig = basic->bsrc; ++ basic->bsrc = dinfo->di_bstart; + hdp = dinfo->di_hdentry; -+ h_d_dst = hdp[0 + bdst].hd_dentry; -+ dinfo->di_bstart = bdst; -+ hdp[0 + bdst].hd_dentry = wh_dentry; ++ h_d_dst = hdp[0 + basic->bdst].hd_dentry; ++ dinfo->di_bstart = basic->bdst; ++ hdp[0 + basic->bdst].hd_dentry = wh_dentry; + h_d_start = NULL; + if (file) { -+ h_d_start = hdp[0 + basic.bsrc].hd_dentry; -+ hdp[0 + basic.bsrc].hd_dentry = au_hf_top(file)->f_dentry; ++ h_d_start = hdp[0 + basic->bsrc].hd_dentry; ++ hdp[0 + basic->bsrc].hd_dentry = au_hf_top(file)->f_dentry; + } -+ err = au_cpup_single(&basic, !AuCpup_DTIME, /*h_parent*/NULL, pin); ++ err = au_cpup_single(basic, !AuCpup_DTIME, /*h_parent*/NULL, pin); + if (file) { + if (!err) + err = au_reopen_nondir(file); -+ hdp[0 + basic.bsrc].hd_dentry = h_d_start; ++ hdp[0 + basic->bsrc].hd_dentry = h_d_start; + } -+ hdp[0 + bdst].hd_dentry = h_d_dst; -+ dinfo->di_bstart = basic.bsrc; ++ hdp[0 + basic->bdst].hd_dentry = h_d_dst; ++ dinfo->di_bstart = basic->bsrc; ++ basic->bsrc = bsrc_orig; + + return err; +} + -+static int au_cpup_wh(struct dentry *dentry, aufs_bindex_t bdst, loff_t len, -+ struct file *file, struct au_pin *pin) ++static int au_cpup_wh(struct au_cpup_basic *basic, struct file *file, ++ struct au_pin *pin) +{ + int err; ++ aufs_bindex_t bdst; + struct au_dtime dt; -+ struct dentry *parent, *h_parent, *wh_dentry; ++ struct dentry *dentry, *parent, *h_parent, *wh_dentry; + struct au_branch *br; + struct path h_path; + ++ dentry = basic->dentry; ++ bdst = basic->bdst; + br = au_sbr(dentry->d_sb, bdst); + parent = dget_parent(dentry); + h_parent = au_h_dptr(parent, bdst); @@ -4246,7 +4246,7 @@ Patch generated by debian/patches/features/all/aufs3/gen-patch + h_path.dentry = h_parent; + h_path.mnt = au_br_mnt(br); + au_dtime_store(&dt, parent, &h_path); -+ err = au_do_cpup_wh(dentry, bdst, wh_dentry, file, len, pin); ++ err = au_do_cpup_wh(basic, wh_dentry, file, pin); + if (unlikely(err)) + goto out_wh; + @@ -4273,9 +4273,7 @@ Patch generated by debian/patches/features/all/aufs3/gen-patch + +struct au_cpup_wh_args { + int *errp; -+ struct dentry *dentry; -+ aufs_bindex_t bdst; -+ loff_t len; ++ struct au_cpup_basic *basic; + struct file *file; + struct au_pin *pin; +}; @@ -4285,19 +4283,22 @@ Patch generated by debian/patches/features/all/aufs3/gen-patch + struct au_cpup_wh_args *a = args; + + au_pin_hdir_acquire_nest(a->pin); -+ *a->errp = au_cpup_wh(a->dentry, a->bdst, a->len, a->file, a->pin); ++ *a->errp = au_cpup_wh(a->basic, a->file, a->pin); + au_pin_hdir_release(a->pin); +} + -+int au_sio_cpup_wh(struct dentry *dentry, aufs_bindex_t bdst, loff_t len, -+ struct file *file, struct au_pin *pin) ++int au_sio_cpup_wh(struct au_cpup_basic *basic, struct file *file, ++ struct au_pin *pin) +{ + int err, wkq_err; -+ struct dentry *parent, *h_orph, *h_parent, *h_dentry; ++ aufs_bindex_t bdst; ++ struct dentry *dentry, *parent, *h_orph, *h_parent, *h_dentry; + struct inode *dir, *h_dir, *h_tmpdir; + struct au_wbr *wbr; + struct au_pin wh_pin; + ++ dentry = basic->dentry; ++ bdst = basic->bdst; + parent = dget_parent(dentry); + dir = parent->d_inode; + h_orph = NULL; @@ -4327,13 +4328,11 @@ Patch generated by debian/patches/features/all/aufs3/gen-patch + + if (!au_test_h_perm_sio(h_tmpdir, MAY_EXEC | MAY_WRITE) + && !au_cpup_sio_test(pin, dentry->d_inode->i_mode)) -+ err = au_cpup_wh(dentry, bdst, len, file, pin); ++ err = au_cpup_wh(basic, file, pin); + else { + struct au_cpup_wh_args args = { + .errp = &err, -+ .dentry = dentry, -+ .bdst = bdst, -+ .len = len, ++ .basic = basic, + .file = file, + .pin = pin + }; @@ -4429,7 +4428,13 @@ Patch generated by debian/patches/features/all/aufs3/gen-patch + struct dentry *h_parent __maybe_unused , + void *arg __maybe_unused) +{ -+ return au_sio_cpup_simple(dentry, bdst, -1, AuCpup_DTIME, pin); ++ struct au_cpup_basic basic = { ++ .dentry = dentry, ++ .bdst = bdst, ++ .bsrc = -1, ++ .len = 0 ++ }; ++ return au_sio_cpup_simple(&basic, AuCpup_DTIME, pin); +} + +int au_cpup_dirs(struct dentry *dentry, aufs_bindex_t bdst) @@ -4461,8 +4466,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-08-07 15:04:57.883008639 +0200 +@@ -0,0 +1,89 @@ +/* + * Copyright (C) 2005-2013 Junjiro R. Okajima + * @@ -4505,11 +4510,19 @@ Patch generated by debian/patches/features/all/aufs3/gen-patch + +/* ---------------------------------------------------------------------- */ + ++struct au_cpup_basic { ++ struct dentry *dentry; ++ aufs_bindex_t bdst, bsrc; ++ loff_t len; ++}; ++ +/* cpup flags */ +#define AuCpup_DTIME 1 /* do dtime_store/revert */ +#define AuCpup_KEEPLINO (1 << 1) /* do not clear the lower xino, + for link(2) */ +#define AuCpup_RENAME (1 << 2) /* rename after cpup */ ++#define AuCpup_HOPEN (1 << 3) /* call h_open_pre/post() in cpup */ ++ +#define au_ftest_cpup(flags, name) ((flags) & AuCpup_##name) +#define au_fset_cpup(flags, name) \ + do { (flags) |= AuCpup_##name; } while (0) @@ -4517,13 +4530,10 @@ Patch generated by debian/patches/features/all/aufs3/gen-patch + do { (flags) &= ~AuCpup_##name; } while (0) + +int au_copy_file(struct file *dst, struct file *src, loff_t len); -+int au_sio_cpup_single(struct dentry *dentry, aufs_bindex_t bdst, -+ aufs_bindex_t bsrc, loff_t len, unsigned int flags, -+ 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_wh(struct dentry *dentry, aufs_bindex_t bdst, loff_t len, -+ struct file *file, struct au_pin *pin); ++int au_sio_cpup_simple(struct au_cpup_basic *basic, unsigned int flags, ++ struct au_pin *pin); ++int au_sio_cpup_wh(struct au_cpup_basic *basic, struct file *file, ++ struct au_pin *pin); + +int au_cp_dirs(struct dentry *dentry, aufs_bindex_t bdst, + int (*cp)(struct dentry *dentry, aufs_bindex_t bdst, @@ -4548,7 +4558,7 @@ Patch generated by debian/patches/features/all/aufs3/gen-patch +#endif /* __KERNEL__ */ +#endif /* __AUFS_CPUP_H__ */ --- a/fs/aufs/dbgaufs.c 1970-01-01 01:00:00.000000000 +0100 -+++ b/fs/aufs/dbgaufs.c 2013-06-02 18:23:34.749538984 +0100 ++++ b/fs/aufs/dbgaufs.c 2013-08-07 15:04:57.883008639 +0200 @@ -0,0 +1,433 @@ +/* + * Copyright (C) 2005-2013 Junjiro R. Okajima @@ -4984,7 +4994,7 @@ Patch generated by debian/patches/features/all/aufs3/gen-patch + return err; +} --- a/fs/aufs/dbgaufs.h 1970-01-01 01:00:00.000000000 +0100 -+++ b/fs/aufs/dbgaufs.h 2013-03-10 01:48:58.459093058 +0000 ++++ b/fs/aufs/dbgaufs.h 2013-03-10 02:48:58.459093058 +0100 @@ -0,0 +1,49 @@ +/* + * Copyright (C) 2005-2013 Junjiro R. Okajima @@ -5036,7 +5046,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-08-04 01:24:24.666688807 +0200 @@ -0,0 +1,243 @@ +/* + * Copyright (C) 2005-2013 Junjiro R. Okajima @@ -5282,7 +5292,7 @@ Patch generated by debian/patches/features/all/aufs3/gen-patch + return path_is_under(path + 0, path + 1); +} --- a/fs/aufs/dcsub.h 1970-01-01 01:00:00.000000000 +0100 -+++ b/fs/aufs/dcsub.h 2013-03-10 01:48:58.459093058 +0000 ++++ b/fs/aufs/dcsub.h 2013-03-10 02:48:58.459093058 +0100 @@ -0,0 +1,94 @@ +/* + * Copyright (C) 2005-2013 Junjiro R. Okajima @@ -5379,7 +5389,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-08-07 15:04:57.883008639 +0200 @@ -0,0 +1,491 @@ +/* + * Copyright (C) 2005-2013 Junjiro R. Okajima @@ -5873,7 +5883,7 @@ Patch generated by debian/patches/features/all/aufs3/gen-patch + return 0; +} --- a/fs/aufs/debug.h 1970-01-01 01:00:00.000000000 +0100 -+++ b/fs/aufs/debug.h 2013-05-04 18:39:11.235157327 +0100 ++++ b/fs/aufs/debug.h 2013-08-07 15:04:57.883008639 +0200 @@ -0,0 +1,242 @@ +/* + * Copyright (C) 2005-2013 Junjiro R. Okajima @@ -6118,7 +6128,7 @@ Patch generated by debian/patches/features/all/aufs3/gen-patch +#endif /* __KERNEL__ */ +#endif /* __AUFS_DEBUG_H__ */ --- a/fs/aufs/dentry.c 1970-01-01 01:00:00.000000000 +0100 -+++ b/fs/aufs/dentry.c 2013-06-02 18:23:34.749538984 +0100 ++++ b/fs/aufs/dentry.c 2013-08-07 15:04:57.883008639 +0200 @@ -0,0 +1,1065 @@ +/* + * Copyright (C) 2005-2013 Junjiro R. Okajima @@ -7186,7 +7196,7 @@ Patch generated by debian/patches/features/all/aufs3/gen-patch + .d_release = aufs_d_release +}; --- a/fs/aufs/dentry.h 1970-01-01 01:00:00.000000000 +0100 -+++ b/fs/aufs/dentry.h 2013-06-02 18:23:34.749538984 +0100 ++++ b/fs/aufs/dentry.h 2013-08-07 15:04:57.883008639 +0200 @@ -0,0 +1,234 @@ +/* + * Copyright (C) 2005-2013 Junjiro R. Okajima @@ -7423,7 +7433,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-08-04 01:24:24.666688807 +0200 @@ -0,0 +1,543 @@ +/* + * Copyright (C) 2005-2013 Junjiro R. Okajima @@ -7969,8 +7979,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-08-07 15:04:57.883008639 +0200 +@@ -0,0 +1,632 @@ +/* + * Copyright (C) 2005-2013 Junjiro R. Okajima + * @@ -8006,6 +8016,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 +8031,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); +} @@ -8602,7 +8614,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-08-04 01:24:24.666688807 +0200 @@ -0,0 +1,137 @@ +/* + * Copyright (C) 2005-2013 Junjiro R. Okajima @@ -8742,7 +8754,7 @@ 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 ++++ b/fs/aufs/dynop.c 2013-08-07 15:04:57.883008639 +0200 @@ -0,0 +1,379 @@ +/* + * Copyright (C) 2010-2013 Junjiro R. Okajima @@ -9124,7 +9136,7 @@ Patch generated by debian/patches/features/all/aufs3/gen-patch + WARN_ON(!list_empty(&dynop[i].head)); +} --- a/fs/aufs/dynop.h 1970-01-01 01:00:00.000000000 +0100 -+++ b/fs/aufs/dynop.h 2013-03-10 01:48:58.459093058 +0000 ++++ b/fs/aufs/dynop.h 2013-03-10 02:48:58.459093058 +0100 @@ -0,0 +1,76 @@ +/* + * Copyright (C) 2010-2013 Junjiro R. Okajima @@ -9203,7 +9215,7 @@ 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 ++++ b/fs/aufs/export.c 2013-08-07 15:04:57.883008639 +0200 @@ -0,0 +1,826 @@ +/* + * Copyright (C) 2005-2013 Junjiro R. Okajima @@ -10032,7 +10044,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-08-07 15:04:57.887008639 +0200 @@ -0,0 +1,721 @@ +/* + * Copyright (C) 2005-2013 Junjiro R. Okajima @@ -10756,8 +10768,8 @@ Patch generated by debian/patches/features/all/aufs3/gen-patch +#endif +}; --- a/fs/aufs/f_op_sp.c 1970-01-01 01:00:00.000000000 +0100 -+++ b/fs/aufs/f_op_sp.c 2013-06-02 18:23:34.753538984 +0100 -@@ -0,0 +1,376 @@ ++++ b/fs/aufs/f_op_sp.c 2013-08-07 15:04:57.887008639 +0200 +@@ -0,0 +1,381 @@ +/* + * Copyright (C) 2005-2013 Junjiro R. Okajima + * @@ -11007,12 +11019,17 @@ Patch generated by debian/patches/features/all/aufs3/gen-patch +static int au_cpup_sp(struct dentry *dentry) +{ + int err; -+ aufs_bindex_t bcpup; + struct au_pin pin; + struct au_wr_dir_args wr_dir_args = { + .force_btgt = -1, + .flags = 0 + }; ++ struct au_cpup_basic basic = { ++ .dentry = dentry, ++ .bdst = -1, ++ .bsrc = -1, ++ .len = -1 ++ }; + + AuDbg("%.*s\n", AuDLNPair(dentry)); + @@ -11021,15 +11038,15 @@ Patch generated by debian/patches/features/all/aufs3/gen-patch + err = au_wr_dir(dentry, /*src_dentry*/NULL, &wr_dir_args); + if (unlikely(err < 0)) + goto out; -+ bcpup = err; ++ basic.bdst = err; + err = 0; -+ if (bcpup == au_dbstart(dentry)) ++ if (basic.bdst == au_dbstart(dentry)) + goto out; /* success */ + -+ err = au_pin(&pin, dentry, bcpup, au_opt_udba(dentry->d_sb), ++ err = au_pin(&pin, dentry, basic.bdst, au_opt_udba(dentry->d_sb), + AuPin_MNT_WRITE); + if (!err) { -+ err = au_sio_cpup_simple(dentry, bcpup, -1, AuCpup_DTIME, &pin); ++ err = au_sio_cpup_simple(&basic, AuCpup_DTIME, &pin); + au_unpin(&pin); + } + @@ -11135,8 +11152,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-08-07 15:04:57.887008639 +0200 +@@ -0,0 +1,704 @@ +/* + * Copyright (C) 2005-2013 Junjiro R. Okajima + * @@ -11361,28 +11378,34 @@ Patch generated by debian/patches/features/all/aufs3/gen-patch +{ + int err; + struct inode *inode, *h_inode; -+ struct dentry *dentry, *h_dentry, *hi_wh; ++ struct dentry *h_dentry, *hi_wh; ++ struct au_cpup_basic basic = { ++ .dentry = file->f_dentry, ++ .bdst = bcpup, ++ .bsrc = -1, ++ .len = len ++ }; + -+ dentry = file->f_dentry; -+ au_update_dbstart(dentry); -+ inode = dentry->d_inode; ++ au_update_dbstart(basic.dentry); ++ inode = basic.dentry->d_inode; + h_inode = NULL; -+ if (au_dbstart(dentry) <= bcpup && au_dbend(dentry) >= bcpup) { -+ h_dentry = au_h_dptr(dentry, bcpup); ++ if (au_dbstart(basic.dentry) <= bcpup ++ && au_dbend(basic.dentry) >= bcpup) { ++ h_dentry = au_h_dptr(basic.dentry, bcpup); + if (h_dentry) + h_inode = h_dentry->d_inode; + } + hi_wh = au_hi_wh(inode, bcpup); + if (!hi_wh && !h_inode) -+ err = au_sio_cpup_wh(dentry, bcpup, len, file, pin); ++ err = au_sio_cpup_wh(&basic, file, pin); + else + /* already copied-up after unlink */ + err = au_reopen_wh(file, bcpup, hi_wh); + + if (!err + && inode->i_nlink > 1 -+ && au_opt_test(au_mntflags(dentry->d_sb), PLINK)) -+ au_plink_append(inode, bcpup, au_h_dptr(dentry, bcpup)); ++ && au_opt_test(au_mntflags(basic.dentry->d_sb), PLINK)) ++ au_plink_append(inode, bcpup, au_h_dptr(basic.dentry, bcpup)); + + return err; +} @@ -11393,72 +11416,78 @@ Patch generated by debian/patches/features/all/aufs3/gen-patch +int au_ready_to_write(struct file *file, loff_t len, struct au_pin *pin) +{ + int err; -+ aufs_bindex_t bstart, bcpup, dbstart; -+ struct dentry *dentry, *parent, *h_dentry; ++ aufs_bindex_t dbstart; ++ struct dentry *parent, *h_dentry; + struct inode *inode; + struct super_block *sb; + struct file *h_file; ++ struct au_cpup_basic basic = { ++ .dentry = file->f_dentry, ++ .bdst = -1, ++ .bsrc = -1, ++ .len = len ++ }; + -+ dentry = file->f_dentry; -+ sb = dentry->d_sb; -+ inode = dentry->d_inode; ++ sb = basic.dentry->d_sb; ++ inode = basic.dentry->d_inode; + AuDebugOn(au_special_file(inode->i_mode)); -+ bstart = au_fbstart(file); -+ err = au_test_ro(sb, bstart, inode); ++ basic.bsrc = au_fbstart(file); ++ err = au_test_ro(sb, basic.bsrc, inode); + if (!err && (au_hf_top(file)->f_mode & FMODE_WRITE)) { -+ err = au_pin(pin, dentry, bstart, AuOpt_UDBA_NONE, /*flags*/0); ++ err = au_pin(pin, basic.dentry, basic.bsrc, AuOpt_UDBA_NONE, ++ /*flags*/0); + goto out; + } + + /* need to cpup or reopen */ -+ parent = dget_parent(dentry); ++ parent = dget_parent(basic.dentry); + di_write_lock_parent(parent); -+ err = AuWbrCopyup(au_sbi(sb), dentry); -+ bcpup = err; ++ err = AuWbrCopyup(au_sbi(sb), basic.dentry); ++ basic.bdst = err; + if (unlikely(err < 0)) + goto out_dgrade; + err = 0; + -+ if (!d_unhashed(dentry) && !au_h_dptr(parent, bcpup)) { -+ err = au_cpup_dirs(dentry, bcpup); ++ if (!d_unhashed(basic.dentry) && !au_h_dptr(parent, basic.bdst)) { ++ err = au_cpup_dirs(basic.dentry, basic.bdst); + if (unlikely(err)) + goto out_dgrade; + } + -+ err = au_pin(pin, dentry, bcpup, AuOpt_UDBA_NONE, ++ err = au_pin(pin, basic.dentry, basic.bdst, AuOpt_UDBA_NONE, + AuPin_DI_LOCKED | AuPin_MNT_WRITE); + if (unlikely(err)) + goto out_dgrade; + + h_dentry = au_hf_top(file)->f_dentry; -+ dbstart = au_dbstart(dentry); -+ if (dbstart <= bcpup) { -+ h_dentry = au_h_dptr(dentry, bcpup); ++ dbstart = au_dbstart(basic.dentry); ++ if (dbstart <= basic.bdst) { ++ h_dentry = au_h_dptr(basic.dentry, basic.bdst); + AuDebugOn(!h_dentry); -+ bstart = bcpup; ++ basic.bsrc = basic.bdst; + } + -+ if (dbstart <= bcpup /* just reopen */ -+ || !d_unhashed(dentry) /* copyup and reopen */ ++ if (dbstart <= basic.bdst /* just reopen */ ++ || !d_unhashed(basic.dentry) /* copyup and reopen */ + ) { -+ h_file = au_h_open_pre(dentry, bstart); ++ h_file = au_h_open_pre(basic.dentry, basic.bsrc); + if (IS_ERR(h_file)) + err = PTR_ERR(h_file); + else { + di_downgrade_lock(parent, AuLock_IR); -+ if (dbstart > bcpup) -+ err = au_sio_cpup_simple(dentry, bcpup, len, -+ AuCpup_DTIME, pin); ++ if (dbstart > basic.bdst) ++ err = au_sio_cpup_simple(&basic, AuCpup_DTIME, ++ pin); + if (!err) + err = au_reopen_nondir(file); -+ au_h_open_post(dentry, bstart, h_file); ++ au_h_open_post(basic.dentry, basic.bsrc, h_file); + } + } else { /* copyup as wh and reopen */ + /* + * since writable hfsplus branch is not supported, + * h_open_pre/post() are unnecessary. + */ -+ err = au_ready_to_write_wh(file, len, bcpup, pin); ++ err = au_ready_to_write_wh(file, len, basic.bdst, pin); + di_downgrade_lock(parent, AuLock_IR); + } + @@ -11508,29 +11537,33 @@ Patch generated by debian/patches/features/all/aufs3/gen-patch +static int au_file_refresh_by_inode(struct file *file, int *need_reopen) +{ + int err; -+ aufs_bindex_t bstart; + struct au_pin pin; + struct au_finfo *finfo; -+ struct dentry *dentry, *parent, *hi_wh; ++ struct dentry *parent, *hi_wh; + struct inode *inode; + struct super_block *sb; ++ struct au_cpup_basic basic = { ++ .dentry = file->f_dentry, ++ .bdst = -1, ++ .bsrc = -1, ++ .len = -1 ++ }; + + FiMustWriteLock(file); + + err = 0; + finfo = au_fi(file); -+ dentry = file->f_dentry; -+ sb = dentry->d_sb; -+ inode = dentry->d_inode; -+ bstart = au_ibstart(inode); -+ if (bstart == finfo->fi_btop || IS_ROOT(dentry)) ++ sb = basic.dentry->d_sb; ++ inode = basic.dentry->d_inode; ++ basic.bdst = au_ibstart(inode); ++ if (basic.bdst == finfo->fi_btop || IS_ROOT(basic.dentry)) + goto out; + -+ parent = dget_parent(dentry); -+ if (au_test_ro(sb, bstart, inode)) { ++ parent = dget_parent(basic.dentry); ++ if (au_test_ro(sb, basic.bdst, inode)) { + di_read_lock_parent(parent, !AuLock_IR); -+ err = AuWbrCopyup(au_sbi(sb), dentry); -+ bstart = err; ++ err = AuWbrCopyup(au_sbi(sb), basic.dentry); ++ basic.bdst = err; + di_read_unlock(parent, !AuLock_IR); + if (unlikely(err < 0)) + goto out_parent; @@ -11538,26 +11571,26 @@ Patch generated by debian/patches/features/all/aufs3/gen-patch + } + + di_read_lock_parent(parent, AuLock_IR); -+ hi_wh = au_hi_wh(inode, bstart); ++ hi_wh = au_hi_wh(inode, basic.bdst); + if (!S_ISDIR(inode->i_mode) + && au_opt_test(au_mntflags(sb), PLINK) + && au_plink_test(inode) -+ && !d_unhashed(dentry) -+ && bstart < au_dbstart(dentry)) { -+ err = au_test_and_cpup_dirs(dentry, bstart); ++ && !d_unhashed(basic.dentry) ++ && basic.bdst < au_dbstart(basic.dentry)) { ++ err = au_test_and_cpup_dirs(basic.dentry, basic.bdst); + if (unlikely(err)) + goto out_unlock; + + /* always superio. */ -+ err = au_pin(&pin, dentry, bstart, AuOpt_UDBA_NONE, ++ err = au_pin(&pin, basic.dentry, basic.bdst, AuOpt_UDBA_NONE, + AuPin_DI_LOCKED | AuPin_MNT_WRITE); -+ if (!err) -+ err = au_sio_cpup_simple(dentry, bstart, -1, -+ AuCpup_DTIME, &pin); -+ au_unpin(&pin); ++ if (!err) { ++ err = au_sio_cpup_simple(&basic, AuCpup_DTIME, &pin); ++ au_unpin(&pin); ++ } + } else if (hi_wh) { + /* already copied-up after unlink */ -+ err = au_reopen_wh(file, bstart, hi_wh); ++ err = au_reopen_wh(file, basic.bdst, hi_wh); + *need_reopen = 0; + } + @@ -11826,7 +11859,7 @@ Patch generated by debian/patches/features/all/aufs3/gen-patch +#endif /* CONFIG_AUFS_DEBUG */ +}; --- a/fs/aufs/file.h 1970-01-01 01:00:00.000000000 +0100 -+++ b/fs/aufs/file.h 2013-06-02 18:23:34.753538984 +0100 ++++ b/fs/aufs/file.h 2013-08-07 15:04:57.887008639 +0200 @@ -0,0 +1,308 @@ +/* + * Copyright (C) 2005-2013 Junjiro R. Okajima @@ -12137,7 +12170,7 @@ Patch generated by debian/patches/features/all/aufs3/gen-patch +#endif /* __KERNEL__ */ +#endif /* __AUFS_FILE_H__ */ --- a/fs/aufs/finfo.c 1970-01-01 01:00:00.000000000 +0100 -+++ b/fs/aufs/finfo.c 2013-03-10 01:48:58.459093058 +0000 ++++ b/fs/aufs/finfo.c 2013-03-10 02:48:58.459093058 +0100 @@ -0,0 +1,157 @@ +/* + * Copyright (C) 2005-2013 Junjiro R. Okajima @@ -12297,7 +12330,7 @@ Patch generated by debian/patches/features/all/aufs3/gen-patch + return err; +} --- a/fs/aufs/fstype.h 1970-01-01 01:00:00.000000000 +0100 -+++ b/fs/aufs/fstype.h 2013-06-02 18:23:34.753538984 +0100 ++++ b/fs/aufs/fstype.h 2013-08-07 15:04:57.887008639 +0200 @@ -0,0 +1,480 @@ +/* + * Copyright (C) 2005-2013 Junjiro R. Okajima @@ -12780,7 +12813,7 @@ Patch generated by debian/patches/features/all/aufs3/gen-patch +#endif /* __KERNEL__ */ +#endif /* __AUFS_FSTYPE_H__ */ --- a/fs/aufs/hfsnotify.c 1970-01-01 01:00:00.000000000 +0100 -+++ b/fs/aufs/hfsnotify.c 2013-06-02 18:23:34.753538984 +0100 ++++ b/fs/aufs/hfsnotify.c 2013-08-07 15:04:57.887008639 +0200 @@ -0,0 +1,296 @@ +/* + * Copyright (C) 2005-2013 Junjiro R. Okajima @@ -13079,7 +13112,7 @@ Patch generated by debian/patches/features/all/aufs3/gen-patch + .init_br = au_hfsn_init_br +}; --- a/fs/aufs/hfsplus.c 1970-01-01 01:00:00.000000000 +0100 -+++ b/fs/aufs/hfsplus.c 2013-06-02 18:23:34.753538984 +0100 ++++ b/fs/aufs/hfsplus.c 2013-06-02 19:23:34.753538984 +0200 @@ -0,0 +1,56 @@ +/* + * Copyright (C) 2010-2013 Junjiro R. Okajima @@ -13138,7 +13171,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-08-07 15:04:57.887008639 +0200 @@ -0,0 +1,712 @@ +/* + * Copyright (C) 2005-2013 Junjiro R. Okajima @@ -13853,8 +13886,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-08-07 15:04:57.887008639 +0200 +@@ -0,0 +1,1111 @@ +/* + * Copyright (C) 2005-2013 Junjiro R. Okajima + * @@ -14487,7 +14520,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,13 +14561,17 @@ 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); + if (!hi_wh) { -+ err = au_sio_cpup_wh(dentry, a->btgt, sz, /*file*/NULL, -+ &a->pin); ++ struct au_cpup_basic basic = { ++ .dentry = dentry, ++ .bdst = a->btgt, ++ .bsrc = -1, ++ .len = sz ++ }; ++ err = au_sio_cpup_wh(&basic, /*file*/NULL, &a->pin); + if (unlikely(err)) + goto out_unlock; + hi_wh = au_hi_wh(inode, a->btgt); @@ -14553,14 +14589,14 @@ 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); -+ } ++ struct au_cpup_basic basic = { ++ .dentry = dentry, ++ .bdst = a->btgt, ++ .bsrc = bstart, ++ .len = sz ++ }; ++ err = au_sio_cpup_simple(&basic, AuCpup_DTIME | AuCpup_HOPEN, ++ &a->pin); + if (!err) + a->h_path.dentry = au_h_dptr(dentry, a->btgt); + } else if (!hi_wh) @@ -14711,6 +14747,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 +15000,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-08-07 15:04:57.887008639 +0200 +@@ -0,0 +1,728 @@ +/* + * Copyright (C) 2005-2013 Junjiro R. Okajima + * @@ -15326,7 +15363,12 @@ Patch generated by debian/patches/features/all/aufs3/gen-patch +{ + int err; + struct dentry *h_src_dentry; -+ struct file *h_file; ++ struct au_cpup_basic basic = { ++ .dentry = src_dentry, ++ .bdst = a->bdst, ++ .bsrc = a->bsrc, ++ .len = -1 ++ }; + + di_read_lock_parent(a->src_parent, AuLock_IR); + err = au_test_and_cpup_dirs(src_dentry, a->bdst); @@ -15339,15 +15381,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(&basic, AuCpup_DTIME | AuCpup_HOPEN, ++ /* AuCpup_KEEPLINO */ ++ &a->pin); + au_unpin(&a->pin); + +out: @@ -15386,8 +15423,14 @@ Patch generated by debian/patches/features/all/aufs3/gen-patch + if (IS_ERR(h_file)) + err = PTR_ERR(h_file); + else { -+ err = au_sio_cpup_simple(dentry, a->bdst, -1, -+ AuCpup_KEEPLINO, &a->pin); ++ struct au_cpup_basic basic = { ++ .dentry = dentry, ++ .bdst = a->bdst, ++ .bsrc = -1, ++ .len = -1 ++ }; ++ err = au_sio_cpup_simple(&basic, AuCpup_KEEPLINO, ++ &a->pin); + au_h_open_post(dentry, a->bsrc, h_file); + if (!err) { + dput(a->h_path.dentry); @@ -15688,7 +15731,7 @@ Patch generated by debian/patches/features/all/aufs3/gen-patch + return err; +} --- a/fs/aufs/i_op_del.c 1970-01-01 01:00:00.000000000 +0100 -+++ b/fs/aufs/i_op_del.c 2013-05-04 18:39:11.235157327 +0100 ++++ b/fs/aufs/i_op_del.c 2013-08-07 15:04:57.887008639 +0200 @@ -0,0 +1,477 @@ +/* + * Copyright (C) 2005-2013 Junjiro R. Okajima @@ -16168,8 +16211,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-08-07 15:04:57.887008639 +0200 +@@ -0,0 +1,1009 @@ +/* + * Copyright (C) 2005-2013 Junjiro R. Okajima + * @@ -16380,33 +16423,9 @@ Patch generated by debian/patches/features/all/aufs3/gen-patch + AuDebugOn(au_dbstart(d) != a->btgt); + err = vfsub_rename(a->src_h_dir, au_h_dptr(d, a->btgt), + a->dst_h_dir, &a->h_path); -+ } else { -+#if 1 ++ } else + BUG(); -+#else -+ struct file *h_file; + -+ au_fset_ren(a->flags, CPUP); -+ au_set_dbstart(d, a->btgt); -+ au_set_h_dptr(d, a->btgt, dget(a->dst_h_dentry)); -+ h_file = au_h_open_pre(d, a->src_bstart); -+ if (IS_ERR(h_file)) -+ err = PTR_ERR(h_file); -+ else { -+ err = au_sio_cpup_single(d, a->btgt, a->src_bstart, -1, -+ !AuCpup_DTIME, a->dst_parent); -+ au_h_open_post(d, a->src_bstart, h_file); -+ } -+ if (!err) { -+ d = a->dst_dentry; -+ au_set_h_dptr(d, a->btgt, NULL); -+ au_update_dbstart(d); -+ } else { -+ au_set_h_dptr(d, a->btgt, NULL); -+ au_set_dbstart(d, a->src_bstart); -+ } -+#endif -+ } + if (!err && a->h_dst) + /* it will be set to dinfo later */ + dget(a->h_dst); @@ -16513,25 +16532,7 @@ Patch generated by debian/patches/features/all/aufs3/gen-patch + a->dst_h_dentry = au_h_dptr(d, a->btgt); + } + -+ /* cpup src */ -+ if (a->dst_h_dentry->d_inode && a->src_bstart != a->btgt) { -+#if 1 -+ BUG(); -+#else -+ struct file *h_file; -+ -+ h_file = au_h_open_pre(a->src_dentry, a->src_bstart); -+ if (IS_ERR(h_file)) -+ err = PTR_ERR(h_file); -+ else { -+ err = au_sio_cpup_simple(a->src_dentry, a->btgt, -1, -+ !AuCpup_DTIME); -+ au_h_open_post(a->src_dentry, a->src_bstart, h_file); -+ } -+ if (unlikely(err)) -+ goto out_whtmp; -+#endif -+ } ++ BUG_ON(a->dst_h_dentry->d_inode && a->src_bstart != a->btgt); + + /* rename by vfs_rename or cpup */ + d = a->dst_dentry; @@ -17133,26 +17134,24 @@ 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) { ++ struct au_cpup_basic basic = { ++ .dentry = a->src_dentry, ++ .bdst = a->btgt, ++ .bsrc = a->src_bstart, ++ .len = -1 ++ }; ++ AuDebugOn(au_dbstart(a->src_dentry) != a->src_bstart); ++ err = au_sio_cpup_simple(&basic, ++ AuCpup_DTIME | AuCpup_HOPEN, ++ &pin); ++ au_unpin(&pin); + } -+ au_unpin(&pin); + if (unlikely(err)) + goto out_children; + a->src_bstart = a->btgt; @@ -17224,7 +17223,7 @@ Patch generated by debian/patches/features/all/aufs3/gen-patch + return err; +} --- a/fs/aufs/iinfo.c 1970-01-01 01:00:00.000000000 +0100 -+++ b/fs/aufs/iinfo.c 2013-03-10 01:48:58.463093058 +0000 ++++ b/fs/aufs/iinfo.c 2013-03-10 02:48:58.463093058 +0100 @@ -0,0 +1,276 @@ +/* + * Copyright (C) 2005-2013 Junjiro R. Okajima @@ -17503,7 +17502,7 @@ Patch generated by debian/patches/features/all/aufs3/gen-patch + AuRwDestroy(&iinfo->ii_rwsem); +} --- a/fs/aufs/inode.c 1970-01-01 01:00:00.000000000 +0100 -+++ b/fs/aufs/inode.c 2013-05-04 18:39:11.235157327 +0100 ++++ b/fs/aufs/inode.c 2013-08-07 15:04:57.887008639 +0200 @@ -0,0 +1,492 @@ +/* + * Copyright (C) 2005-2013 Junjiro R. Okajima @@ -17998,7 +17997,7 @@ Patch generated by debian/patches/features/all/aufs3/gen-patch + 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 2013-06-02 18:23:34.753538984 +0100 ++++ b/fs/aufs/inode.h 2013-08-07 15:04:57.887008639 +0200 @@ -0,0 +1,600 @@ +/* + * Copyright (C) 2005-2013 Junjiro R. Okajima @@ -18601,7 +18600,7 @@ Patch generated by debian/patches/features/all/aufs3/gen-patch +#endif /* __KERNEL__ */ +#endif /* __AUFS_INODE_H__ */ --- a/fs/aufs/ioctl.c 1970-01-01 01:00:00.000000000 +0100 -+++ b/fs/aufs/ioctl.c 2013-03-10 01:48:58.463093058 +0000 ++++ b/fs/aufs/ioctl.c 2013-03-10 02:48:58.463093058 +0100 @@ -0,0 +1,196 @@ +/* + * Copyright (C) 2005-2013 Junjiro R. Okajima @@ -18800,7 +18799,7 @@ 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 ++++ b/fs/aufs/loop.c 2013-08-04 01:24:24.670688807 +0200 @@ -0,0 +1,135 @@ +/* + * Copyright (C) 2005-2013 Junjiro R. Okajima @@ -18938,7 +18937,7 @@ 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 ++++ b/fs/aufs/loop.h 2013-08-04 01:24:24.670688807 +0200 @@ -0,0 +1,50 @@ +/* + * Copyright (C) 2005-2013 Junjiro R. Okajima @@ -18991,7 +18990,7 @@ Patch generated by debian/patches/features/all/aufs3/gen-patch +#endif /* __KERNEL__ */ +#endif /* __AUFS_LOOP_H__ */ --- a/fs/aufs/magic.mk 1970-01-01 01:00:00.000000000 +0100 -+++ b/fs/aufs/magic.mk 2012-01-10 02:15:56.000000000 +0000 ++++ b/fs/aufs/magic.mk 2012-01-10 03:15:56.000000000 +0100 @@ -0,0 +1,54 @@ + +# defined in ${srctree}/fs/fuse/inode.c @@ -19048,7 +19047,7 @@ Patch generated by debian/patches/features/all/aufs3/gen-patch +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 2013-06-02 18:23:34.753538984 +0100 ++++ b/fs/aufs/module.c 2013-08-07 15:04:57.887008639 +0200 @@ -0,0 +1,203 @@ +/* + * Copyright (C) 2005-2013 Junjiro R. Okajima @@ -19254,7 +19253,7 @@ Patch generated by debian/patches/features/all/aufs3/gen-patch +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 2013-03-10 01:48:58.463093058 +0000 ++++ b/fs/aufs/module.h 2013-03-10 02:48:58.463093058 +0100 @@ -0,0 +1,105 @@ +/* + * Copyright (C) 2005-2013 Junjiro R. Okajima @@ -19362,7 +19361,7 @@ Patch generated by debian/patches/features/all/aufs3/gen-patch +#endif /* __KERNEL__ */ +#endif /* __AUFS_MODULE_H__ */ --- a/fs/aufs/opts.c 1970-01-01 01:00:00.000000000 +0100 -+++ b/fs/aufs/opts.c 2013-06-02 18:23:34.753538984 +0100 ++++ b/fs/aufs/opts.c 2013-06-02 19:23:34.753538984 +0200 @@ -0,0 +1,1697 @@ +/* + * Copyright (C) 2005-2013 Junjiro R. Okajima @@ -21062,7 +21061,7 @@ Patch generated by debian/patches/features/all/aufs3/gen-patch + return au_mntflags(sb) & AuOptMask_UDBA; +} --- a/fs/aufs/opts.h 1970-01-01 01:00:00.000000000 +0100 -+++ b/fs/aufs/opts.h 2013-03-10 01:48:58.463093058 +0000 ++++ b/fs/aufs/opts.h 2013-03-10 02:48:58.463093058 +0100 @@ -0,0 +1,209 @@ +/* + * Copyright (C) 2005-2013 Junjiro R. Okajima @@ -21274,7 +21273,7 @@ Patch generated by debian/patches/features/all/aufs3/gen-patch +#endif /* __KERNEL__ */ +#endif /* __AUFS_OPTS_H__ */ --- a/fs/aufs/plink.c 1970-01-01 01:00:00.000000000 +0100 -+++ b/fs/aufs/plink.c 2013-06-02 18:23:34.753538984 +0100 ++++ b/fs/aufs/plink.c 2013-08-07 15:04:57.887008639 +0200 @@ -0,0 +1,520 @@ +/* + * Copyright (C) 2005-2013 Junjiro R. Okajima @@ -21797,7 +21796,7 @@ Patch generated by debian/patches/features/all/aufs3/gen-patch + } +} --- a/fs/aufs/poll.c 1970-01-01 01:00:00.000000000 +0100 -+++ b/fs/aufs/poll.c 2013-03-10 01:48:58.463093058 +0000 ++++ b/fs/aufs/poll.c 2013-03-10 02:48:58.463093058 +0100 @@ -0,0 +1,56 @@ +/* + * Copyright (C) 2005-2013 Junjiro R. Okajima @@ -21856,7 +21855,7 @@ Patch generated by debian/patches/features/all/aufs3/gen-patch + return mask; +} --- a/fs/aufs/procfs.c 1970-01-01 01:00:00.000000000 +0100 -+++ b/fs/aufs/procfs.c 2013-03-10 01:48:58.463093058 +0000 ++++ b/fs/aufs/procfs.c 2013-03-10 02:48:58.463093058 +0100 @@ -0,0 +1,170 @@ +/* + * Copyright (C) 2010-2013 Junjiro R. Okajima @@ -22029,7 +22028,7 @@ 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 ++++ b/fs/aufs/rdu.c 2013-08-07 15:04:57.887008639 +0200 @@ -0,0 +1,384 @@ +/* + * Copyright (C) 2005-2013 Junjiro R. Okajima @@ -22416,7 +22415,7 @@ Patch generated by debian/patches/features/all/aufs3/gen-patch +} +#endif --- a/fs/aufs/rwsem.h 1970-01-01 01:00:00.000000000 +0100 -+++ b/fs/aufs/rwsem.h 2013-03-10 01:48:58.463093058 +0000 ++++ b/fs/aufs/rwsem.h 2013-03-10 02:48:58.463093058 +0100 @@ -0,0 +1,188 @@ +/* + * Copyright (C) 2005-2013 Junjiro R. Okajima @@ -22607,7 +22606,7 @@ Patch generated by debian/patches/features/all/aufs3/gen-patch +#endif /* __KERNEL__ */ +#endif /* __AUFS_RWSEM_H__ */ --- a/fs/aufs/sbinfo.c 1970-01-01 01:00:00.000000000 +0100 -+++ b/fs/aufs/sbinfo.c 2013-06-02 18:23:34.753538984 +0100 ++++ b/fs/aufs/sbinfo.c 2013-06-02 19:23:34.753538984 +0200 @@ -0,0 +1,346 @@ +/* + * Copyright (C) 2005-2013 Junjiro R. Okajima @@ -22956,7 +22955,7 @@ Patch generated by debian/patches/features/all/aufs3/gen-patch + spin_unlock(&sbinfo->au_si_pid.tree_lock); +} --- a/fs/aufs/spl.h 1970-01-01 01:00:00.000000000 +0100 -+++ b/fs/aufs/spl.h 2013-06-02 18:23:34.753538984 +0100 ++++ b/fs/aufs/spl.h 2013-06-02 19:23:34.753538984 +0200 @@ -0,0 +1,112 @@ +/* + * Copyright (C) 2005-2013 Junjiro R. Okajima @@ -23071,7 +23070,7 @@ Patch generated by debian/patches/features/all/aufs3/gen-patch +#endif /* __KERNEL__ */ +#endif /* __AUFS_SPL_H__ */ --- a/fs/aufs/super.c 1970-01-01 01:00:00.000000000 +0100 -+++ b/fs/aufs/super.c 2013-06-02 18:23:34.753538984 +0100 ++++ b/fs/aufs/super.c 2013-08-07 15:04:57.887008639 +0200 @@ -0,0 +1,992 @@ +/* + * Copyright (C) 2005-2013 Junjiro R. Okajima @@ -24066,7 +24065,7 @@ Patch generated by debian/patches/features/all/aufs3/gen-patch + .owner = THIS_MODULE, +}; --- a/fs/aufs/super.h 1970-01-01 01:00:00.000000000 +0100 -+++ b/fs/aufs/super.h 2013-06-02 18:23:34.753538984 +0100 ++++ b/fs/aufs/super.h 2013-06-02 19:23:34.753538984 +0200 @@ -0,0 +1,555 @@ +/* + * Copyright (C) 2005-2013 Junjiro R. Okajima @@ -24624,7 +24623,7 @@ Patch generated by debian/patches/features/all/aufs3/gen-patch +#endif /* __KERNEL__ */ +#endif /* __AUFS_SUPER_H__ */ --- a/fs/aufs/sysaufs.c 1970-01-01 01:00:00.000000000 +0100 -+++ b/fs/aufs/sysaufs.c 2013-03-10 01:48:58.463093058 +0000 ++++ b/fs/aufs/sysaufs.c 2013-03-10 02:48:58.463093058 +0100 @@ -0,0 +1,105 @@ +/* + * Copyright (C) 2005-2013 Junjiro R. Okajima @@ -24732,7 +24731,7 @@ Patch generated by debian/patches/features/all/aufs3/gen-patch + return err; +} --- a/fs/aufs/sysaufs.h 1970-01-01 01:00:00.000000000 +0100 -+++ b/fs/aufs/sysaufs.h 2013-03-10 01:48:58.463093058 +0000 ++++ b/fs/aufs/sysaufs.h 2013-03-10 02:48:58.463093058 +0100 @@ -0,0 +1,104 @@ +/* + * Copyright (C) 2005-2013 Junjiro R. Okajima @@ -24839,7 +24838,7 @@ Patch generated by debian/patches/features/all/aufs3/gen-patch +#endif /* __KERNEL__ */ +#endif /* __SYSAUFS_H__ */ --- a/fs/aufs/sysfs.c 1970-01-01 01:00:00.000000000 +0100 -+++ b/fs/aufs/sysfs.c 2013-06-02 18:23:34.753538984 +0100 ++++ b/fs/aufs/sysfs.c 2013-06-02 19:23:34.753538984 +0200 @@ -0,0 +1,257 @@ +/* + * Copyright (C) 2005-2013 Junjiro R. Okajima @@ -25099,7 +25098,7 @@ Patch generated by debian/patches/features/all/aufs3/gen-patch + } +} --- a/fs/aufs/sysrq.c 1970-01-01 01:00:00.000000000 +0100 -+++ b/fs/aufs/sysrq.c 2013-06-02 18:23:34.753538984 +0100 ++++ b/fs/aufs/sysrq.c 2013-08-07 15:04:57.887008639 +0200 @@ -0,0 +1,151 @@ +/* + * Copyright (C) 2005-2013 Junjiro R. Okajima @@ -25253,7 +25252,7 @@ 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 ++++ b/fs/aufs/vdir.c 2013-08-07 15:04:57.887008639 +0200 @@ -0,0 +1,878 @@ +/* + * Copyright (C) 2005-2013 Junjiro R. Okajima @@ -26134,7 +26133,7 @@ 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 ++++ b/fs/aufs/vfsub.c 2013-08-07 15:04:57.891008639 +0200 @@ -0,0 +1,769 @@ +/* + * Copyright (C) 2005-2013 Junjiro R. Okajima @@ -26906,7 +26905,7 @@ 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 ++++ b/fs/aufs/vfsub.h 2013-08-07 15:04:57.891008639 +0200 @@ -0,0 +1,294 @@ +/* + * Copyright (C) 2005-2013 Junjiro R. Okajima @@ -27203,7 +27202,7 @@ Patch generated by debian/patches/features/all/aufs3/gen-patch +#endif /* __KERNEL__ */ +#endif /* __AUFS_VFSUB_H__ */ --- a/fs/aufs/wbr_policy.c 1970-01-01 01:00:00.000000000 +0100 -+++ b/fs/aufs/wbr_policy.c 2013-06-02 18:23:34.753538984 +0100 ++++ b/fs/aufs/wbr_policy.c 2013-06-02 19:23:34.753538984 +0200 @@ -0,0 +1,701 @@ +/* + * Copyright (C) 2005-2013 Junjiro R. Okajima @@ -27907,7 +27906,7 @@ Patch generated by debian/patches/features/all/aufs3/gen-patch + } +}; --- a/fs/aufs/whout.c 1970-01-01 01:00:00.000000000 +0100 -+++ b/fs/aufs/whout.c 2013-06-02 18:23:34.753538984 +0100 ++++ b/fs/aufs/whout.c 2013-08-07 15:04:57.891008639 +0200 @@ -0,0 +1,1022 @@ +/* + * Copyright (C) 2005-2013 Junjiro R. Okajima @@ -28932,7 +28931,7 @@ Patch generated by debian/patches/features/all/aufs3/gen-patch + } +} --- a/fs/aufs/whout.h 1970-01-01 01:00:00.000000000 +0100 -+++ b/fs/aufs/whout.h 2013-06-02 18:23:34.753538984 +0100 ++++ b/fs/aufs/whout.h 2013-06-02 19:23:34.753538984 +0200 @@ -0,0 +1,87 @@ +/* + * Copyright (C) 2005-2013 Junjiro R. Okajima @@ -29022,7 +29021,7 @@ Patch generated by debian/patches/features/all/aufs3/gen-patch +#endif /* __KERNEL__ */ +#endif /* __AUFS_WHOUT_H__ */ --- a/fs/aufs/wkq.c 1970-01-01 01:00:00.000000000 +0100 -+++ b/fs/aufs/wkq.c 2013-06-02 18:23:34.757538984 +0100 ++++ b/fs/aufs/wkq.c 2013-08-07 15:04:57.891008639 +0200 @@ -0,0 +1,213 @@ +/* + * Copyright (C) 2005-2013 Junjiro R. Okajima @@ -29238,7 +29237,7 @@ Patch generated by debian/patches/features/all/aufs3/gen-patch + return err; +} --- a/fs/aufs/wkq.h 1970-01-01 01:00:00.000000000 +0100 -+++ b/fs/aufs/wkq.h 2013-03-10 01:48:58.463093058 +0000 ++++ b/fs/aufs/wkq.h 2013-03-10 02:48:58.463093058 +0100 @@ -0,0 +1,92 @@ +/* + * Copyright (C) 2005-2013 Junjiro R. Okajima @@ -29333,7 +29332,7 @@ Patch generated by debian/patches/features/all/aufs3/gen-patch +#endif /* __KERNEL__ */ +#endif /* __AUFS_WKQ_H__ */ --- a/fs/aufs/xino.c 1970-01-01 01:00:00.000000000 +0100 -+++ b/fs/aufs/xino.c 2013-06-02 18:23:34.757538984 +0100 ++++ b/fs/aufs/xino.c 2013-08-07 15:04:57.891008639 +0200 @@ -0,0 +1,1264 @@ +/* + * Copyright (C) 2005-2013 Junjiro R. Okajima @@ -30600,7 +30599,7 @@ Patch generated by debian/patches/features/all/aufs3/gen-patch + return err; +} --- a/include/linux/aufs_type.h 1970-01-01 01:00:00.000000000 +0100 -+++ b/include/linux/aufs_type.h 2013-05-04 18:39:11.239157326 +0100 ++++ b/include/linux/aufs_type.h 2013-08-07 15:04:57.891008639 +0200 @@ -0,0 +1,19 @@ +/* + * Copyright (C) 2012-2013 Junjiro R. Okajima @@ -30622,7 +30621,7 @@ Patch generated by debian/patches/features/all/aufs3/gen-patch + +#include --- 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-08-07 15:04:57.891008639 +0200 @@ -0,0 +1,235 @@ +/* + * Copyright (C) 2005-2013 Junjiro R. Okajima @@ -30666,7 +30665,7 @@ Patch generated by debian/patches/features/all/aufs3/gen-patch + +#include + -+#define AUFS_VERSION "3.x-rcN-20130520" ++#define AUFS_VERSION "3.10-20130805" + +/* todo? move this to linux-2.6.19/include/magic.h */ +#define AUFS_SUPER_MAGIC ('a' << 24 | 'u' << 16 | 'f' << 8 | 's') diff --git a/debian/patches/features/all/aufs3/aufs3-base.patch b/debian/patches/features/all/aufs3/aufs3-base.patch index 01f289cc2..e40fbb4cb 100644 --- a/debian/patches/features/all/aufs3/aufs3-base.patch +++ b/debian/patches/features/all/aufs3/aufs3-base.patch @@ -1,15 +1,15 @@ From: J. R. Okajima -Date: Sat May 18 10:36:30 2013 +0900 -Subject: aufs3.x-rcN base patch -Origin: http://sourceforge.net/p/aufs/aufs3-standalone/ci/4f14cef47eb7c23eda7198931fbab1040866b6ee/tree/ +Date: Wed Jul 3 13:35:19 2013 +0900 +Subject: aufs3.10 base patch +Origin: http://sourceforge.net/p/aufs/aufs3-standalone/ci/a1069fdacd4c7e2650d1616c172465c74260600f/tree/ Bug-Debian: http://bugs.debian.org/541828 Patch headers added by debian/patches/features/all/aufs3/gen-patch -aufs3.x-rcN base patch +aufs3.10 base patch diff --git a/fs/file_table.c b/fs/file_table.c -index cd4d87a..ca5948f 100644 +index 485dc0e..8db8096 100644 --- a/fs/file_table.c +++ b/fs/file_table.c @@ -36,7 +36,7 @@ struct files_stat_struct files_stat = { @@ -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 d37431d..987346f 100644 --- a/fs/splice.c +++ b/fs/splice.c @@ -1093,8 +1093,8 @@ EXPORT_SYMBOL(generic_splice_sendpage); @@ -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 65c2be2..0148214 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 *); +@@ -2574,6 +2574,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; diff --git a/debian/patches/features/all/aufs3/aufs3-kbuild.patch b/debian/patches/features/all/aufs3/aufs3-kbuild.patch index 3dcc56285..cf617e1e1 100644 --- a/debian/patches/features/all/aufs3/aufs3-kbuild.patch +++ b/debian/patches/features/all/aufs3/aufs3-kbuild.patch @@ -1,12 +1,12 @@ From: J. R. Okajima -Date: Fri May 10 00:27:35 2013 +0900 -Subject: aufs3.x-rcN kbuild patch -Origin: http://sourceforge.net/p/aufs/aufs3-standalone/ci/4f14cef47eb7c23eda7198931fbab1040866b6ee/tree/ +Date: Wed Jul 3 13:35:19 2013 +0900 +Subject: aufs3.10 kbuild patch +Origin: http://sourceforge.net/p/aufs/aufs3-standalone/ci/a1069fdacd4c7e2650d1616c172465c74260600f/tree/ Bug-Debian: http://bugs.debian.org/541828 Patch headers added by debian/patches/features/all/aufs3/gen-patch -aufs3.x-rcN kbuild patch +aufs3.10 kbuild patch diff --git a/fs/Kconfig b/fs/Kconfig index c229f82..397b473 100644 @@ -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 bdc6e87..349600c 100644 --- a/include/uapi/linux/Kbuild +++ b/include/uapi/linux/Kbuild @@ -56,6 +56,7 @@ header-y += atmppp.h diff --git a/debian/patches/features/all/aufs3/aufs3-standalone.patch b/debian/patches/features/all/aufs3/aufs3-standalone.patch index be4f17eba..2225217ea 100644 --- a/debian/patches/features/all/aufs3/aufs3-standalone.patch +++ b/debian/patches/features/all/aufs3/aufs3-standalone.patch @@ -1,15 +1,15 @@ From: J. R. Okajima -Date: Fri May 10 00:27:35 2013 +0900 -Subject: aufs3.x-rcN standalone patch -Origin: http://sourceforge.net/p/aufs/aufs3-standalone/ci/4f14cef47eb7c23eda7198931fbab1040866b6ee/tree/ +Date: Wed Jul 3 13:35:19 2013 +0900 +Subject: aufs3.10 standalone patch +Origin: http://sourceforge.net/p/aufs/aufs3-standalone/ci/a1069fdacd4c7e2650d1616c172465c74260600f/tree/ Bug-Debian: http://bugs.debian.org/541828 Patch headers added by debian/patches/features/all/aufs3/gen-patch -aufs3.x-rcN standalone patch +aufs3.10 standalone patch diff --git a/fs/file_table.c b/fs/file_table.c -index ca5948f..b553610 100644 +index 8db8096..e271e28 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) +@@ -405,6 +406,8 @@ void file_sb_list_del(struct file *file) } } @@ -162,7 +162,7 @@ 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 987346f..8d6a045 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,