diff --git a/debian/changelog b/debian/changelog index a1ad66e92..cd4057dc5 100644 --- a/debian/changelog +++ b/debian/changelog @@ -135,6 +135,11 @@ linux (3.2.38-1) UNRELEASED; urgency=low - Apply upstream changes up to Linux 3.8-rc1 * [armhf/mx5] Update description to mention i.MX53 * mm: Try harder to allocate vmemmap blocks (Closes: #699913) + * aufs: Update to aufs3.2-20130204: + - support for syncfs(2) + - possible bugfix, race in lookup + - bugfix, half refreshed iinfo + - possible bugfix, au_lkup_by_ino() returns ESTALE [ Aurelien Jarno ] * [armhf/vexpress] Add kernel udebs. diff --git a/debian/patches/features/all/aufs3/aufs3-add.patch b/debian/patches/features/all/aufs3/aufs3-add.patch index 93dc0f02d..200c901d7 100644 --- a/debian/patches/features/all/aufs3/aufs3-add.patch +++ b/debian/patches/features/all/aufs3/aufs3-add.patch @@ -1,5 +1,5 @@ --- a/fs/aufs/Kconfig 1970-01-01 01:00:00.000000000 +0100 -+++ b/fs/aufs/Kconfig 2012-01-10 02:15:56.545455955 +0000 ++++ b/fs/aufs/Kconfig 2012-01-10 02:15:56.000000000 +0000 @@ -0,0 +1,203 @@ +config AUFS_FS + tristate "Aufs (Advanced multi layered unification filesystem) support" @@ -205,7 +205,7 @@ + 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.619414717 +0100 ++++ b/fs/aufs/Makefile 2012-08-01 03:41:52.000000000 +0100 @@ -0,0 +1,42 @@ + +include ${src}/magic.mk @@ -250,10 +250,10 @@ +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 2012-01-10 02:15:56.545455955 +0000 ++++ b/fs/aufs/aufs.h 2013-02-13 14:16:11.494511808 +0000 @@ -0,0 +1,60 @@ +/* -+ * Copyright (C) 2005-2012 Junjiro R. Okajima ++ * Copyright (C) 2005-2013 Junjiro R. Okajima + * + * This program, aufs is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by @@ -313,10 +313,10 @@ +#endif /* __KERNEL__ */ +#endif /* __AUFS_H__ */ --- a/fs/aufs/branch.c 1970-01-01 01:00:00.000000000 +0100 -+++ b/fs/aufs/branch.c 2012-10-10 06:26:21.201348727 +0100 -@@ -0,0 +1,1169 @@ ++++ b/fs/aufs/branch.c 2013-02-13 14:16:11.494511808 +0000 +@@ -0,0 +1,1172 @@ +/* -+ * Copyright (C) 2005-2012 Junjiro R. Okajima ++ * Copyright (C) 2005-2013 Junjiro R. Okajima + * + * This program, aufs is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by @@ -373,7 +373,10 @@ + else + break; + ++ /* recursive lock, s_umount of branch's */ ++ lockdep_off(); + mntput(br->br_mnt); ++ lockdep_on(); + kfree(wbr); + kfree(br); +} @@ -949,7 +952,7 @@ + continue; + + /* AuDbgInode(i); */ -+ if (au_iigen(i) == sigen) ++ if (au_iigen(i, NULL) == sigen) + ii_read_lock_child(i); + else { + ii_write_lock_child(i); @@ -1485,10 +1488,10 @@ + return err; +} --- a/fs/aufs/branch.h 1970-01-01 01:00:00.000000000 +0100 -+++ b/fs/aufs/branch.h 2012-01-10 02:15:56.545455955 +0000 ++++ b/fs/aufs/branch.h 2013-02-13 14:16:11.494511808 +0000 @@ -0,0 +1,230 @@ +/* -+ * Copyright (C) 2005-2012 Junjiro R. Okajima ++ * Copyright (C) 2005-2013 Junjiro R. Okajima + * + * This program, aufs is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by @@ -1718,7 +1721,7 @@ +#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.545455955 +0000 ++++ b/fs/aufs/conf.mk 2012-01-10 02:15:56.000000000 +0000 @@ -0,0 +1,38 @@ + +AuConfStr = CONFIG_AUFS_FS=${CONFIG_AUFS_FS} @@ -1759,10 +1762,10 @@ + +-include ${srctree}/${src}/conf_priv.mk --- a/fs/aufs/cpup.c 1970-01-01 01:00:00.000000000 +0100 -+++ b/fs/aufs/cpup.c 2012-10-10 06:26:21.205348749 +0100 ++++ b/fs/aufs/cpup.c 2013-02-13 14:16:11.494511808 +0000 @@ -0,0 +1,1079 @@ +/* -+ * Copyright (C) 2005-2012 Junjiro R. Okajima ++ * Copyright (C) 2005-2013 Junjiro R. Okajima + * + * This program, aufs is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by @@ -2841,10 +2844,10 @@ + return err; +} --- a/fs/aufs/cpup.h 1970-01-01 01:00:00.000000000 +0100 -+++ b/fs/aufs/cpup.h 2012-01-10 02:15:56.545455955 +0000 ++++ b/fs/aufs/cpup.h 2013-02-13 14:16:11.494511808 +0000 @@ -0,0 +1,81 @@ +/* -+ * Copyright (C) 2005-2012 Junjiro R. Okajima ++ * Copyright (C) 2005-2013 Junjiro R. Okajima + * + * This program, aufs is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by @@ -2925,10 +2928,10 @@ +#endif /* __KERNEL__ */ +#endif /* __AUFS_CPUP_H__ */ --- a/fs/aufs/dbgaufs.c 1970-01-01 01:00:00.000000000 +0100 -+++ b/fs/aufs/dbgaufs.c 2012-01-10 02:15:56.545455955 +0000 ++++ b/fs/aufs/dbgaufs.c 2013-02-13 14:16:11.498511808 +0000 @@ -0,0 +1,334 @@ +/* -+ * Copyright (C) 2005-2012 Junjiro R. Okajima ++ * Copyright (C) 2005-2013 Junjiro R. Okajima + * + * This program, aufs is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by @@ -3262,10 +3265,10 @@ + return err; +} --- a/fs/aufs/dbgaufs.h 1970-01-01 01:00:00.000000000 +0100 -+++ b/fs/aufs/dbgaufs.h 2012-01-10 02:15:56.545455955 +0000 ++++ b/fs/aufs/dbgaufs.h 2013-02-13 14:16:11.498511808 +0000 @@ -0,0 +1,49 @@ +/* -+ * Copyright (C) 2005-2012 Junjiro R. Okajima ++ * Copyright (C) 2005-2013 Junjiro R. Okajima + * + * This program, aufs is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by @@ -3314,10 +3317,10 @@ +#endif /* __KERNEL__ */ +#endif /* __DBGAUFS_H__ */ --- a/fs/aufs/dcsub.c 1970-01-01 01:00:00.000000000 +0100 -+++ b/fs/aufs/dcsub.c 2012-01-10 02:15:56.545455955 +0000 ++++ b/fs/aufs/dcsub.c 2013-02-13 14:16:11.498511808 +0000 @@ -0,0 +1,243 @@ +/* -+ * Copyright (C) 2005-2012 Junjiro R. Okajima ++ * Copyright (C) 2005-2013 Junjiro R. Okajima + * + * This program, aufs is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by @@ -3560,10 +3563,10 @@ + 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 2012-01-10 02:15:56.545455955 +0000 ++++ b/fs/aufs/dcsub.h 2013-02-13 14:16:11.498511808 +0000 @@ -0,0 +1,94 @@ +/* -+ * Copyright (C) 2005-2012 Junjiro R. Okajima ++ * Copyright (C) 2005-2013 Junjiro R. Okajima + * + * This program, aufs is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by @@ -3657,10 +3660,10 @@ +#endif /* __KERNEL__ */ +#endif /* __AUFS_DCSUB_H__ */ --- a/fs/aufs/debug.c 1970-01-01 01:00:00.000000000 +0100 -+++ b/fs/aufs/debug.c 2012-10-10 06:26:21.205348749 +0100 ++++ b/fs/aufs/debug.c 2013-02-13 14:16:11.498511808 +0000 @@ -0,0 +1,489 @@ +/* -+ * Copyright (C) 2005-2012 Junjiro R. Okajima ++ * Copyright (C) 2005-2013 Junjiro R. Okajima + * + * This program, aufs is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by @@ -3785,7 +3788,7 @@ + if (!iinfo) + return; + dpri("i-1: bstart %d, bend %d, gen %d\n", -+ iinfo->ii_bstart, iinfo->ii_bend, au_iigen(inode)); ++ iinfo->ii_bstart, iinfo->ii_bend, au_iigen(inode, NULL)); + if (iinfo->ii_bstart < 0) + return; + hn = 0; @@ -4149,10 +4152,10 @@ + return 0; +} --- a/fs/aufs/debug.h 1970-01-01 01:00:00.000000000 +0100 -+++ b/fs/aufs/debug.h 2012-10-10 06:26:21.225348843 +0100 ++++ b/fs/aufs/debug.h 2013-02-13 14:16:11.498511808 +0000 @@ -0,0 +1,243 @@ +/* -+ * Copyright (C) 2005-2012 Junjiro R. Okajima ++ * Copyright (C) 2005-2013 Junjiro R. Okajima + * + * This program, aufs is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by @@ -4395,10 +4398,10 @@ +#endif /* __KERNEL__ */ +#endif /* __AUFS_DEBUG_H__ */ --- a/fs/aufs/dentry.c 1970-01-01 01:00:00.000000000 +0100 -+++ b/fs/aufs/dentry.c 2012-10-10 06:26:21.225348843 +0100 ++++ b/fs/aufs/dentry.c 2013-02-13 14:16:11.498511808 +0000 @@ -0,0 +1,1140 @@ +/* -+ * Copyright (C) 2005-2012 Junjiro R. Okajima ++ * Copyright (C) 2005-2013 Junjiro R. Okajima + * + * This program, aufs is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by @@ -5538,10 +5541,10 @@ + .d_release = aufs_d_release +}; --- a/fs/aufs/dentry.h 1970-01-01 01:00:00.000000000 +0100 -+++ b/fs/aufs/dentry.h 2012-10-10 06:26:21.225348843 +0100 ++++ b/fs/aufs/dentry.h 2013-02-13 14:16:11.498511808 +0000 @@ -0,0 +1,237 @@ +/* -+ * Copyright (C) 2005-2012 Junjiro R. Okajima ++ * Copyright (C) 2005-2013 Junjiro R. Okajima + * + * This program, aufs is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by @@ -5778,10 +5781,10 @@ +#endif /* __KERNEL__ */ +#endif /* __AUFS_DENTRY_H__ */ --- a/fs/aufs/dinfo.c 1970-01-01 01:00:00.000000000 +0100 -+++ b/fs/aufs/dinfo.c 2012-01-10 02:15:56.549455982 +0000 ++++ b/fs/aufs/dinfo.c 2013-02-13 14:16:11.498511808 +0000 @@ -0,0 +1,543 @@ +/* -+ * Copyright (C) 2005-2012 Junjiro R. Okajima ++ * Copyright (C) 2005-2013 Junjiro R. Okajima + * + * This program, aufs is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by @@ -6324,10 +6327,10 @@ + return -1; +} --- a/fs/aufs/dir.c 1970-01-01 01:00:00.000000000 +0100 -+++ b/fs/aufs/dir.c 2012-10-10 06:26:21.225348843 +0100 ++++ b/fs/aufs/dir.c 2013-02-13 14:16:11.498511808 +0000 @@ -0,0 +1,634 @@ +/* -+ * Copyright (C) 2005-2012 Junjiro R. Okajima ++ * Copyright (C) 2005-2013 Junjiro R. Okajima + * + * This program, aufs is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by @@ -6961,10 +6964,10 @@ + .fsync = aufs_fsync_dir +}; --- a/fs/aufs/dir.h 1970-01-01 01:00:00.000000000 +0100 -+++ b/fs/aufs/dir.h 2012-01-10 02:15:56.549455982 +0000 ++++ b/fs/aufs/dir.h 2013-02-13 14:16:11.498511808 +0000 @@ -0,0 +1,137 @@ +/* -+ * Copyright (C) 2005-2012 Junjiro R. Okajima ++ * Copyright (C) 2005-2013 Junjiro R. Okajima + * + * This program, aufs is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by @@ -7101,10 +7104,10 @@ +#endif /* __KERNEL__ */ +#endif /* __AUFS_DIR_H__ */ --- a/fs/aufs/dynop.c 1970-01-01 01:00:00.000000000 +0100 -+++ b/fs/aufs/dynop.c 2012-10-10 06:26:21.225348843 +0100 ++++ b/fs/aufs/dynop.c 2013-02-13 14:16:11.498511808 +0000 @@ -0,0 +1,377 @@ +/* -+ * Copyright (C) 2010-2012 Junjiro R. Okajima ++ * Copyright (C) 2010-2013 Junjiro R. Okajima + * + * This program, aufs is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by @@ -7481,10 +7484,10 @@ + 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 2012-01-10 02:15:56.549455982 +0000 ++++ b/fs/aufs/dynop.h 2013-02-13 14:16:11.498511808 +0000 @@ -0,0 +1,76 @@ +/* -+ * Copyright (C) 2010-2012 Junjiro R. Okajima ++ * Copyright (C) 2010-2013 Junjiro R. Okajima + * + * This program, aufs is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by @@ -7560,10 +7563,10 @@ +#endif /* __KERNEL__ */ +#endif /* __AUFS_DYNOP_H__ */ --- a/fs/aufs/export.c 1970-01-01 01:00:00.000000000 +0100 -+++ b/fs/aufs/export.c 2012-10-10 06:26:21.241348914 +0100 -@@ -0,0 +1,804 @@ ++++ b/fs/aufs/export.c 2013-02-13 14:16:11.498511808 +0000 +@@ -0,0 +1,805 @@ +/* -+ * Copyright (C) 2005-2012 Junjiro R. Okajima ++ * Copyright (C) 2005-2013 Junjiro R. Okajima + * + * This program, aufs is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by @@ -7784,7 +7787,7 @@ + sigen = au_sigen(sb); + if (unlikely(is_bad_inode(inode) + || IS_DEADDIR(inode) -+ || sigen != au_iigen(inode))) ++ || sigen != au_iigen(inode, NULL))) + goto out_iput; + + dentry = NULL; @@ -7944,7 +7947,8 @@ + dentry = ERR_PTR(err); + if (unlikely(err)) + goto out_name; -+ dentry = ERR_PTR(-ENOENT); ++ /* instead of ENOENT */ ++ dentry = ERR_PTR(-ESTALE); + if (!arg.found) + goto out_name; + @@ -8367,10 +8371,10 @@ + 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 2012-10-10 06:26:21.241348914 +0100 ++++ b/fs/aufs/f_op.c 2013-02-13 14:16:11.498511808 +0000 @@ -0,0 +1,729 @@ +/* -+ * Copyright (C) 2005-2012 Junjiro R. Okajima ++ * Copyright (C) 2005-2013 Junjiro R. Okajima + * + * This program, aufs is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by @@ -9099,10 +9103,10 @@ +#endif +}; --- a/fs/aufs/f_op_sp.c 1970-01-01 01:00:00.000000000 +0100 -+++ b/fs/aufs/f_op_sp.c 2012-10-10 06:26:21.241348914 +0100 ++++ b/fs/aufs/f_op_sp.c 2013-02-13 14:16:11.498511808 +0000 @@ -0,0 +1,298 @@ +/* -+ * Copyright (C) 2005-2012 Junjiro R. Okajima ++ * Copyright (C) 2005-2013 Junjiro R. Okajima + * + * This program, aufs is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by @@ -9400,10 +9404,10 @@ + return ret; +} --- a/fs/aufs/file.c 1970-01-01 01:00:00.000000000 +0100 -+++ b/fs/aufs/file.c 2012-10-10 06:26:21.241348914 +0100 ++++ b/fs/aufs/file.c 2013-02-13 14:16:11.498511808 +0000 @@ -0,0 +1,673 @@ +/* -+ * Copyright (C) 2005-2012 Junjiro R. Okajima ++ * Copyright (C) 2005-2013 Junjiro R. Okajima + * + * This program, aufs is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by @@ -10076,10 +10080,10 @@ +#endif /* CONFIG_AUFS_DEBUG */ +}; --- a/fs/aufs/file.h 1970-01-01 01:00:00.000000000 +0100 -+++ b/fs/aufs/file.h 2012-08-01 03:41:52.619414717 +0100 ++++ b/fs/aufs/file.h 2013-02-13 14:16:11.498511808 +0000 @@ -0,0 +1,298 @@ +/* -+ * Copyright (C) 2005-2012 Junjiro R. Okajima ++ * Copyright (C) 2005-2013 Junjiro R. Okajima + * + * This program, aufs is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by @@ -10377,10 +10381,10 @@ +#endif /* __KERNEL__ */ +#endif /* __AUFS_FILE_H__ */ --- a/fs/aufs/finfo.c 1970-01-01 01:00:00.000000000 +0100 -+++ b/fs/aufs/finfo.c 2012-01-10 02:15:56.549455982 +0000 -@@ -0,0 +1,156 @@ ++++ b/fs/aufs/finfo.c 2013-02-13 14:16:11.498511808 +0000 +@@ -0,0 +1,157 @@ +/* -+ * Copyright (C) 2005-2012 Junjiro R. Okajima ++ * Copyright (C) 2005-2013 Junjiro R. Okajima + * + * This program, aufs is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by @@ -10508,7 +10512,7 @@ + +int au_finfo_init(struct file *file, struct au_fidir *fidir) +{ -+ int err, lc_idx; ++ int err; + struct au_finfo *finfo; + struct dentry *dentry; + @@ -10520,10 +10524,11 @@ + + err = 0; + au_nfiles_inc(dentry->d_sb); -+ lc_idx = AuLcNonDir_FIINFO; -+ if (fidir) -+ lc_idx = AuLcDir_FIINFO; -+ au_rw_class(&finfo->fi_rwsem, au_lc_key + lc_idx); ++ /* verbose coding for lock class name */ ++ if (!fidir) ++ au_rw_class(&finfo->fi_rwsem, au_lc_key + AuLcNonDir_FIINFO); ++ else ++ au_rw_class(&finfo->fi_rwsem, au_lc_key + AuLcDir_FIINFO); + au_rw_write_lock(&finfo->fi_rwsem); + finfo->fi_btop = -1; + finfo->fi_hdir = fidir; @@ -10536,10 +10541,10 @@ + return err; +} --- a/fs/aufs/fstype.h 1970-01-01 01:00:00.000000000 +0100 -+++ b/fs/aufs/fstype.h 2012-10-10 06:26:21.241348914 +0100 ++++ b/fs/aufs/fstype.h 2013-02-13 14:16:11.498511808 +0000 @@ -0,0 +1,496 @@ +/* -+ * Copyright (C) 2005-2012 Junjiro R. Okajima ++ * Copyright (C) 2005-2013 Junjiro R. Okajima + * + * This program, aufs is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by @@ -11035,10 +11040,10 @@ +#endif /* __KERNEL__ */ +#endif /* __AUFS_FSTYPE_H__ */ --- a/fs/aufs/hfsnotify.c 1970-01-01 01:00:00.000000000 +0100 -+++ b/fs/aufs/hfsnotify.c 2012-10-10 06:26:21.241348914 +0100 ++++ b/fs/aufs/hfsnotify.c 2013-02-13 14:16:11.498511808 +0000 @@ -0,0 +1,260 @@ +/* -+ * Copyright (C) 2005-2012 Junjiro R. Okajima ++ * Copyright (C) 2005-2013 Junjiro R. Okajima + * + * This program, aufs is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by @@ -11298,10 +11303,10 @@ + .init_br = au_hfsn_init_br +}; --- a/fs/aufs/hfsplus.c 1970-01-01 01:00:00.000000000 +0100 -+++ b/fs/aufs/hfsplus.c 2012-01-10 02:15:56.553455997 +0000 ++++ b/fs/aufs/hfsplus.c 2013-02-13 14:16:11.498511808 +0000 @@ -0,0 +1,57 @@ +/* -+ * Copyright (C) 2010-2012 Junjiro R. Okajima ++ * Copyright (C) 2010-2013 Junjiro R. Okajima + * + * This program, aufs is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by @@ -11358,10 +11363,10 @@ + } +} --- a/fs/aufs/hnotify.c 1970-01-01 01:00:00.000000000 +0100 -+++ b/fs/aufs/hnotify.c 2012-10-10 06:26:21.241348914 +0100 ++++ b/fs/aufs/hnotify.c 2013-02-13 14:16:11.498511808 +0000 @@ -0,0 +1,712 @@ +/* -+ * Copyright (C) 2005-2012 Junjiro R. Okajima ++ * Copyright (C) 2005-2013 Junjiro R. Okajima + * + * This program, aufs is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by @@ -12073,10 +12078,10 @@ + au_hn_destroy_cache(); +} --- a/fs/aufs/i_op.c 1970-01-01 01:00:00.000000000 +0100 -+++ b/fs/aufs/i_op.c 2012-10-10 06:26:21.241348914 +0100 -@@ -0,0 +1,987 @@ ++++ b/fs/aufs/i_op.c 2013-02-13 14:16:11.498511808 +0000 +@@ -0,0 +1,1004 @@ +/* -+ * Copyright (C) 2005-2012 Junjiro R. Okajima ++ * Copyright (C) 2005-2013 Junjiro R. Okajima + * + * This program, aufs is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by @@ -12235,19 +12240,25 @@ + struct dentry *ret, *parent; + struct inode *inode; + struct super_block *sb; -+ int err, npositive, lc_idx; ++ int err, npositive; + + IMustLock(dir); + ++ /* todo: support rcu-walk? */ ++ ret = ERR_PTR(-ECHILD); ++ if (nd && (nd->flags & LOOKUP_RCU)) ++ goto out; ++ ++ ret = ERR_PTR(-ENAMETOOLONG); ++ if (unlikely(dentry->d_name.len > AUFS_MAX_NAMELEN)) ++ goto out; ++ + sb = dir->i_sb; + err = si_read_lock(sb, AuLock_FLUSH | AuLock_NOPLM); + ret = ERR_PTR(err); + if (unlikely(err)) + goto out; + -+ ret = ERR_PTR(-ENAMETOOLONG); -+ if (unlikely(dentry->d_name.len > AUFS_MAX_NAMELEN)) -+ goto out_si; + err = au_di_init(dentry); + ret = ERR_PTR(err); + if (unlikely(err)) @@ -12280,6 +12291,13 @@ + } + + ret = d_splice_alias(inode, dentry); ++#if 0 ++ if (unlikely(d_need_lookup(dentry))) { ++ spin_lock(&dentry->d_lock); ++ dentry->d_flags &= ~DCACHE_NEED_LOOKUP; ++ spin_unlock(&dentry->d_lock); ++ } else ++#endif + if (unlikely(IS_ERR(ret) && inode)) { + ii_write_unlock(inode); + iput(inode); @@ -12289,12 +12307,16 @@ +out_unlock: + di_write_unlock(dentry); + if (inode) { -+ lc_idx = AuLcNonDir_DIINFO; -+ if (S_ISLNK(inode->i_mode)) -+ lc_idx = AuLcSymlink_DIINFO; -+ else if (S_ISDIR(inode->i_mode)) -+ lc_idx = AuLcDir_DIINFO; -+ au_rw_class(&au_di(dentry)->di_rwsem, au_lc_key + lc_idx); ++ /* verbose coding for lock class name */ ++ if (unlikely(S_ISLNK(inode->i_mode))) ++ au_rw_class(&au_di(dentry)->di_rwsem, ++ au_lc_key + AuLcSymlink_DIINFO); ++ else if (unlikely(S_ISDIR(inode->i_mode))) ++ au_rw_class(&au_di(dentry)->di_rwsem, ++ au_lc_key + AuLcDir_DIINFO); ++ else /* likely */ ++ au_rw_class(&au_di(dentry)->di_rwsem, ++ au_lc_key + AuLcNonDir_DIINFO); + } +out_si: + si_read_unlock(sb); @@ -13063,10 +13085,10 @@ + .truncate_range = aufs_truncate_range +}; --- a/fs/aufs/i_op_add.c 1970-01-01 01:00:00.000000000 +0100 -+++ b/fs/aufs/i_op_add.c 2012-10-10 06:26:21.261349000 +0100 ++++ b/fs/aufs/i_op_add.c 2013-02-13 14:16:11.502511808 +0000 @@ -0,0 +1,711 @@ +/* -+ * Copyright (C) 2005-2012 Junjiro R. Okajima ++ * Copyright (C) 2005-2013 Junjiro R. Okajima + * + * This program, aufs is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by @@ -13777,10 +13799,10 @@ + return err; +} --- a/fs/aufs/i_op_del.c 1970-01-01 01:00:00.000000000 +0100 -+++ b/fs/aufs/i_op_del.c 2012-10-10 06:26:21.261349000 +0100 ++++ b/fs/aufs/i_op_del.c 2013-02-13 14:16:11.502511808 +0000 @@ -0,0 +1,478 @@ +/* -+ * Copyright (C) 2005-2012 Junjiro R. Okajima ++ * Copyright (C) 2005-2013 Junjiro R. Okajima + * + * This program, aufs is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by @@ -14258,10 +14280,10 @@ + return err; +} --- a/fs/aufs/i_op_ren.c 1970-01-01 01:00:00.000000000 +0100 -+++ b/fs/aufs/i_op_ren.c 2012-10-10 06:26:21.261349000 +0100 ++++ b/fs/aufs/i_op_ren.c 2013-02-13 14:16:11.502511808 +0000 @@ -0,0 +1,1026 @@ +/* -+ * Copyright (C) 2005-2012 Junjiro R. Okajima ++ * Copyright (C) 2005-2013 Junjiro R. Okajima + * + * This program, aufs is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by @@ -15287,10 +15309,10 @@ + return err; +} --- a/fs/aufs/iinfo.c 1970-01-01 01:00:00.000000000 +0100 -+++ b/fs/aufs/iinfo.c 2012-01-10 02:15:56.557456016 +0000 -@@ -0,0 +1,264 @@ ++++ b/fs/aufs/iinfo.c 2013-02-13 14:16:11.502511808 +0000 +@@ -0,0 +1,276 @@ +/* -+ * Copyright (C) 2005-2012 Junjiro R. Okajima ++ * Copyright (C) 2005-2013 Junjiro R. Okajima + * + * This program, aufs is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by @@ -15401,10 +15423,22 @@ + hinode->hi_whdentry = h_wh; +} + -+void au_update_iigen(struct inode *inode) ++void au_update_iigen(struct inode *inode, int half) +{ -+ atomic_set(&au_ii(inode)->ii_generation, au_sigen(inode->i_sb)); -+ /* smp_mb(); */ /* atomic_set */ ++ struct au_iinfo *iinfo; ++ struct au_iigen *iigen; ++ unsigned int sigen; ++ ++ sigen = au_sigen(inode->i_sb); ++ iinfo = au_ii(inode); ++ iigen = &iinfo->ii_generation; ++ spin_lock(&iinfo->ii_genspin); ++ iigen->ig_generation = sigen; ++ if (half) ++ au_ig_fset(iigen->ig_flags, HALF_REFRESHED); ++ else ++ au_ig_fclr(iigen->ig_flags, HALF_REFRESHED); ++ spin_unlock(&iinfo->ii_genspin); +} + +/* it may be called at remount time, too */ @@ -15455,6 +15489,7 @@ + struct au_iinfo *iinfo = &c->iinfo; + static struct lock_class_key aufs_ii; + ++ spin_lock_init(&iinfo->ii_genspin); + au_rw_init(&iinfo->ii_rwsem); + au_rw_class(&iinfo->ii_rwsem, &aufs_ii); + inode_init_once(&c->vfs_inode); @@ -15477,8 +15512,7 @@ + for (i = 0; i < nbr; i++) + iinfo->ii_hinode[i].hi_id = -1; + -+ atomic_set(&iinfo->ii_generation, au_sigen(sb)); -+ /* smp_mb(); */ /* atomic_set */ ++ iinfo->ii_generation.ig_generation = au_sigen(sb); + iinfo->ii_bstart = -1; + iinfo->ii_bend = -1; + iinfo->ii_vdir = NULL; @@ -15554,10 +15588,10 @@ + AuRwDestroy(&iinfo->ii_rwsem); +} --- a/fs/aufs/inode.c 1970-01-01 01:00:00.000000000 +0100 -+++ b/fs/aufs/inode.c 2012-10-10 06:26:21.261349000 +0100 -@@ -0,0 +1,478 @@ ++++ b/fs/aufs/inode.c 2013-02-13 14:16:11.502511808 +0000 +@@ -0,0 +1,492 @@ +/* -+ * Copyright (C) 2005-2012 Junjiro R. Okajima ++ * Copyright (C) 2005-2013 Junjiro R. Okajima + * + * This program, aufs is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by @@ -15592,7 +15626,7 @@ +static void au_refresh_hinode_attr(struct inode *inode, int do_version) +{ + au_cpup_attr_all(inode, /*force*/0); -+ au_update_iigen(inode); ++ au_update_iigen(inode, /*half*/1); + if (do_version) + inode->i_version++; +} @@ -15811,6 +15845,8 @@ +static int reval_inode(struct inode *inode, struct dentry *dentry) +{ + int err; ++ unsigned int gen; ++ struct au_iigen iigen; + aufs_bindex_t bindex, bend; + struct inode *h_inode, *h_dinode; + @@ -15829,12 +15865,20 @@ + bend = au_ibend(inode); + for (bindex = au_ibstart(inode); bindex <= bend; bindex++) { + h_inode = au_h_iptr(inode, bindex); -+ if (h_inode && h_inode == h_dinode) { -+ err = 0; -+ if (au_iigen_test(inode, au_digen(dentry))) -+ err = au_refresh_hinode(inode, dentry); ++ if (!h_inode || h_inode != h_dinode) ++ continue; ++ ++ err = 0; ++ gen = au_iigen(inode, &iigen); ++ if (gen == au_digen(dentry) ++ && !au_ig_ftest(iigen.ig_flags, HALF_REFRESHED)) + break; -+ } ++ ++ /* fully refresh inode using dentry */ ++ err = au_refresh_hinode(inode, dentry); ++ if (!err) ++ au_update_iigen(inode, /*half*/0); ++ break; + } + + if (unlikely(err)) @@ -15884,7 +15928,7 @@ + struct super_block *sb; + struct mutex *mtx; + ino_t h_ino, ino; -+ int err, lc_idx; ++ int err; + aufs_bindex_t bstart; + + sb = dentry->d_sb; @@ -15925,12 +15969,16 @@ + + AuDbg("%lx, new %d\n", inode->i_state, !!(inode->i_state & I_NEW)); + if (inode->i_state & I_NEW) { -+ lc_idx = AuLcNonDir_IIINFO; -+ if (S_ISLNK(h_inode->i_mode)) -+ lc_idx = AuLcSymlink_IIINFO; -+ else if (S_ISDIR(h_inode->i_mode)) -+ lc_idx = AuLcDir_IIINFO; -+ au_rw_class(&au_ii(inode)->ii_rwsem, au_lc_key + lc_idx); ++ /* verbose coding for lock class name */ ++ if (unlikely(S_ISLNK(h_inode->i_mode))) ++ au_rw_class(&au_ii(inode)->ii_rwsem, ++ au_lc_key + AuLcSymlink_IIINFO); ++ else if (unlikely(S_ISDIR(h_inode->i_mode))) ++ au_rw_class(&au_ii(inode)->ii_rwsem, ++ au_lc_key + AuLcDir_IIINFO); ++ else /* likely */ ++ au_rw_class(&au_ii(inode)->ii_rwsem, ++ au_lc_key + AuLcNonDir_IIINFO); + + ii_write_lock_new_child(inode); + err = set_inode(inode, dentry); @@ -16035,10 +16083,10 @@ + return au_test_h_perm(h_inode, mask); +} --- a/fs/aufs/inode.h 1970-01-01 01:00:00.000000000 +0100 -+++ b/fs/aufs/inode.h 2012-10-10 06:26:21.261349000 +0100 -@@ -0,0 +1,559 @@ ++++ b/fs/aufs/inode.h 2013-02-13 14:16:11.502511808 +0000 +@@ -0,0 +1,587 @@ +/* -+ * Copyright (C) 2005-2012 Junjiro R. Okajima ++ * Copyright (C) 2005-2013 Junjiro R. Okajima + * + * This program, aufs is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by @@ -16090,9 +16138,22 @@ + struct dentry *hi_whdentry; +}; + ++/* ig_flags */ ++#define AuIG_HALF_REFRESHED 1 ++#define au_ig_ftest(flags, name) ((flags) & AuIG_##name) ++#define au_ig_fset(flags, name) \ ++ do { (flags) |= AuIG_##name; } while (0) ++#define au_ig_fclr(flags, name) \ ++ do { (flags) &= ~AuIG_##name; } while (0) ++ ++struct au_iigen { ++ __u32 ig_generation, ig_flags; ++}; ++ +struct au_vdir; +struct au_iinfo { -+ atomic_t ii_generation; ++ spinlock_t ii_genspin; ++ struct au_iigen ii_generation; + struct super_block *ii_hsb1; /* no get/put */ + + struct au_rwsem ii_rwsem; @@ -16240,7 +16301,7 @@ +void au_set_h_iptr(struct inode *inode, aufs_bindex_t bindex, + struct inode *h_inode, unsigned int flags); + -+void au_update_iigen(struct inode *inode); ++void au_update_iigen(struct inode *inode, int half); +void au_update_ibrange(struct inode *inode, int do_put_zero); + +void au_icntnr_init_once(void *_c); @@ -16348,9 +16409,19 @@ +#endif +} + -+static inline unsigned int au_iigen(struct inode *inode) ++static inline unsigned int au_iigen(struct inode *inode, struct au_iigen *iigen) +{ -+ return atomic_read(&au_ii(inode)->ii_generation); ++ unsigned int gen; ++ struct au_iinfo *iinfo; ++ ++ iinfo = au_ii(inode); ++ spin_lock(&iinfo->ii_genspin); ++ if (iigen) ++ *iigen = iinfo->ii_generation; ++ gen = iinfo->ii_generation.ig_generation; ++ spin_unlock(&iinfo->ii_genspin); ++ ++ return gen; +} + +/* tiny test for inode number */ @@ -16367,7 +16438,12 @@ + +static inline void au_iigen_dec(struct inode *inode) +{ -+ atomic_dec(&au_ii(inode)->ii_generation); ++ struct au_iinfo *iinfo; ++ ++ iinfo = au_ii(inode); ++ spin_lock(&iinfo->ii_genspin); ++ iinfo->ii_generation.ig_generation--; ++ spin_unlock(&iinfo->ii_genspin); +} + +static inline int au_iigen_test(struct inode *inode, unsigned int sigen) @@ -16375,7 +16451,7 @@ + int err; + + err = 0; -+ if (unlikely(inode && au_iigen(inode) != sigen)) ++ if (unlikely(inode && au_iigen(inode, NULL) != sigen)) + err = -EIO; + + return err; @@ -16597,10 +16673,10 @@ +#endif /* __KERNEL__ */ +#endif /* __AUFS_INODE_H__ */ --- a/fs/aufs/ioctl.c 1970-01-01 01:00:00.000000000 +0100 -+++ b/fs/aufs/ioctl.c 2012-01-10 02:15:56.557456016 +0000 ++++ b/fs/aufs/ioctl.c 2013-02-13 14:16:11.502511808 +0000 @@ -0,0 +1,196 @@ +/* -+ * Copyright (C) 2005-2012 Junjiro R. Okajima ++ * Copyright (C) 2005-2013 Junjiro R. Okajima + * + * This program, aufs is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by @@ -16796,10 +16872,10 @@ +#endif +#endif --- a/fs/aufs/loop.c 1970-01-01 01:00:00.000000000 +0100 -+++ b/fs/aufs/loop.c 2012-07-22 01:31:00.162115458 +0100 ++++ b/fs/aufs/loop.c 2013-02-13 14:16:11.502511808 +0000 @@ -0,0 +1,133 @@ +/* -+ * Copyright (C) 2005-2012 Junjiro R. Okajima ++ * Copyright (C) 2005-2013 Junjiro R. Okajima + * + * This program, aufs is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by @@ -16932,10 +17008,10 @@ + kfree(au_warn_loopback_array); +} --- a/fs/aufs/loop.h 1970-01-01 01:00:00.000000000 +0100 -+++ b/fs/aufs/loop.h 2012-01-10 02:15:56.557456016 +0000 ++++ b/fs/aufs/loop.h 2013-02-13 14:16:11.502511808 +0000 @@ -0,0 +1,50 @@ +/* -+ * Copyright (C) 2005-2012 Junjiro R. Okajima ++ * Copyright (C) 2005-2013 Junjiro R. Okajima + * + * This program, aufs is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by @@ -16985,7 +17061,7 @@ +#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.557456016 +0000 ++++ b/fs/aufs/magic.mk 2012-01-10 02:15:56.000000000 +0000 @@ -0,0 +1,54 @@ + +# defined in ${srctree}/fs/fuse/inode.c @@ -17042,10 +17118,10 @@ +ccflags-y += -DHFSPLUS_SUPER_MAGIC=0x482b +endif --- a/fs/aufs/module.c 1970-01-01 01:00:00.000000000 +0100 -+++ b/fs/aufs/module.c 2012-03-11 05:01:22.570973560 +0000 ++++ b/fs/aufs/module.c 2013-02-13 14:16:11.502511808 +0000 @@ -0,0 +1,196 @@ +/* -+ * Copyright (C) 2005-2012 Junjiro R. Okajima ++ * Copyright (C) 2005-2013 Junjiro R. Okajima + * + * This program, aufs is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by @@ -17241,10 +17317,10 @@ +module_init(aufs_init); +module_exit(aufs_exit); --- a/fs/aufs/module.h 1970-01-01 01:00:00.000000000 +0100 -+++ b/fs/aufs/module.h 2012-03-11 05:01:22.570973560 +0000 ++++ b/fs/aufs/module.h 2013-02-13 14:16:11.502511808 +0000 @@ -0,0 +1,105 @@ +/* -+ * Copyright (C) 2005-2012 Junjiro R. Okajima ++ * Copyright (C) 2005-2013 Junjiro R. Okajima + * + * This program, aufs is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by @@ -17349,10 +17425,10 @@ +#endif /* __KERNEL__ */ +#endif /* __AUFS_MODULE_H__ */ --- a/fs/aufs/opts.c 1970-01-01 01:00:00.000000000 +0100 -+++ b/fs/aufs/opts.c 2012-07-22 01:31:00.166115467 +0100 ++++ b/fs/aufs/opts.c 2013-02-13 14:16:11.502511808 +0000 @@ -0,0 +1,1677 @@ +/* -+ * Copyright (C) 2005-2012 Junjiro R. Okajima ++ * Copyright (C) 2005-2013 Junjiro R. Okajima + * + * This program, aufs is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by @@ -19029,10 +19105,10 @@ + return au_mntflags(sb) & AuOptMask_UDBA; +} --- a/fs/aufs/opts.h 1970-01-01 01:00:00.000000000 +0100 -+++ b/fs/aufs/opts.h 2012-01-10 02:15:56.561456041 +0000 ++++ b/fs/aufs/opts.h 2013-02-13 14:16:11.502511808 +0000 @@ -0,0 +1,209 @@ +/* -+ * Copyright (C) 2005-2012 Junjiro R. Okajima ++ * Copyright (C) 2005-2013 Junjiro R. Okajima + * + * This program, aufs is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by @@ -19241,10 +19317,10 @@ +#endif /* __KERNEL__ */ +#endif /* __AUFS_OPTS_H__ */ --- a/fs/aufs/plink.c 1970-01-01 01:00:00.000000000 +0100 -+++ b/fs/aufs/plink.c 2012-10-10 06:26:21.261349000 +0100 ++++ b/fs/aufs/plink.c 2013-02-13 14:16:11.502511808 +0000 @@ -0,0 +1,515 @@ +/* -+ * Copyright (C) 2005-2012 Junjiro R. Okajima ++ * Copyright (C) 2005-2013 Junjiro R. Okajima + * + * This program, aufs is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by @@ -19759,10 +19835,10 @@ + } +} --- a/fs/aufs/poll.c 1970-01-01 01:00:00.000000000 +0100 -+++ b/fs/aufs/poll.c 2012-01-10 02:15:56.561456041 +0000 ++++ b/fs/aufs/poll.c 2013-02-13 14:16:11.502511808 +0000 @@ -0,0 +1,56 @@ +/* -+ * Copyright (C) 2005-2012 Junjiro R. Okajima ++ * Copyright (C) 2005-2013 Junjiro R. Okajima + * + * This program, aufs is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by @@ -19818,10 +19894,10 @@ + return mask; +} --- a/fs/aufs/procfs.c 1970-01-01 01:00:00.000000000 +0100 -+++ b/fs/aufs/procfs.c 2012-01-10 02:15:56.561456041 +0000 ++++ b/fs/aufs/procfs.c 2013-02-13 14:16:11.502511808 +0000 @@ -0,0 +1,170 @@ +/* -+ * Copyright (C) 2010-2012 Junjiro R. Okajima ++ * Copyright (C) 2010-2013 Junjiro R. Okajima + * + * This program, aufs is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by @@ -19991,10 +20067,10 @@ + return err; +} --- a/fs/aufs/rdu.c 1970-01-01 01:00:00.000000000 +0100 -+++ b/fs/aufs/rdu.c 2012-10-10 06:26:21.261349000 +0100 ++++ b/fs/aufs/rdu.c 2013-02-13 14:16:11.502511808 +0000 @@ -0,0 +1,383 @@ +/* -+ * Copyright (C) 2005-2012 Junjiro R. Okajima ++ * Copyright (C) 2005-2013 Junjiro R. Okajima + * + * This program, aufs is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by @@ -20377,10 +20453,10 @@ +} +#endif --- a/fs/aufs/rwsem.h 1970-01-01 01:00:00.000000000 +0100 -+++ b/fs/aufs/rwsem.h 2012-01-10 02:15:56.561456041 +0000 ++++ b/fs/aufs/rwsem.h 2013-02-13 14:16:11.502511808 +0000 @@ -0,0 +1,188 @@ +/* -+ * Copyright (C) 2005-2012 Junjiro R. Okajima ++ * Copyright (C) 2005-2013 Junjiro R. Okajima + * + * This program, aufs is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by @@ -20568,10 +20644,10 @@ +#endif /* __KERNEL__ */ +#endif /* __AUFS_RWSEM_H__ */ --- a/fs/aufs/sbinfo.c 1970-01-01 01:00:00.000000000 +0100 -+++ b/fs/aufs/sbinfo.c 2012-01-10 02:15:56.561456041 +0000 ++++ b/fs/aufs/sbinfo.c 2013-02-13 14:16:11.502511808 +0000 @@ -0,0 +1,343 @@ +/* -+ * Copyright (C) 2005-2012 Junjiro R. Okajima ++ * Copyright (C) 2005-2013 Junjiro R. Okajima + * + * This program, aufs is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by @@ -20729,7 +20805,7 @@ + + gen = ++au_sbi(sb)->si_generation; + au_update_digen(sb->s_root); -+ au_update_iigen(sb->s_root->d_inode); ++ au_update_iigen(sb->s_root->d_inode, /*half*/0); + sb->s_root->d_inode->i_version++; + return gen; +} @@ -20914,10 +20990,10 @@ + 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 2012-01-10 02:15:56.561456041 +0000 ++++ b/fs/aufs/spl.h 2013-02-13 14:16:11.502511808 +0000 @@ -0,0 +1,62 @@ +/* -+ * Copyright (C) 2005-2012 Junjiro R. Okajima ++ * Copyright (C) 2005-2013 Junjiro R. Okajima + * + * This program, aufs is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by @@ -20979,10 +21055,10 @@ +#endif /* __KERNEL__ */ +#endif /* __AUFS_SPL_H__ */ --- a/fs/aufs/super.c 1970-01-01 01:00:00.000000000 +0100 -+++ b/fs/aufs/super.c 2012-10-10 06:26:21.261349000 +0100 -@@ -0,0 +1,968 @@ ++++ b/fs/aufs/super.c 2013-02-13 14:16:11.502511808 +0000 +@@ -0,0 +1,999 @@ +/* -+ * Copyright (C) 2005-2012 Junjiro R. Okajima ++ * Copyright (C) 2005-2013 Junjiro R. Okajima + * + * This program, aufs is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by @@ -21402,6 +21478,36 @@ + +/* ---------------------------------------------------------------------- */ + ++static int aufs_sync_fs(struct super_block *sb, int wait) ++{ ++ int err, e; ++ aufs_bindex_t bend, bindex; ++ struct au_branch *br; ++ struct super_block *h_sb; ++ ++ err = 0; ++ si_noflush_read_lock(sb); ++ bend = au_sbend(sb); ++ for (bindex = 0; bindex <= bend; bindex++) { ++ br = au_sbr(sb, bindex); ++ if (!au_br_writable(br->br_perm)) ++ continue; ++ ++ h_sb = au_sbr_sb(sb, bindex); ++ if (h_sb->s_op->sync_fs) { ++ e = h_sb->s_op->sync_fs(h_sb, wait); ++ if (unlikely(e && !err)) ++ err = e; ++ /* go on even if an error happens */ ++ } ++ } ++ si_read_unlock(sb); ++ ++ return err; ++} ++ ++/* ---------------------------------------------------------------------- */ ++ +/* final actions when unmounting a file system */ +static void aufs_put_super(struct super_block *sb) +{ @@ -21612,7 +21718,7 @@ + sigen = au_sigen(sb); + for (ull = 0; ull < max; ull++) { + inode = array[ull]; -+ if (au_iigen(inode) != sigen) { ++ if (au_iigen(inode, NULL) != sigen) { + ii_write_lock_child(inode); + e = au_refresh_hinode_self(inode); + ii_write_unlock(inode); @@ -21765,6 +21871,7 @@ + .show_options = aufs_show_options, + .statfs = aufs_statfs, + .put_super = aufs_put_super, ++ .sync_fs = aufs_sync_fs, + .remount_fs = aufs_remount_fs +}; + @@ -21950,10 +22057,10 @@ + .owner = THIS_MODULE, +}; --- a/fs/aufs/super.h 1970-01-01 01:00:00.000000000 +0100 -+++ b/fs/aufs/super.h 2012-01-10 02:15:56.569456073 +0000 ++++ b/fs/aufs/super.h 2013-02-13 14:16:11.502511808 +0000 @@ -0,0 +1,546 @@ +/* -+ * Copyright (C) 2005-2012 Junjiro R. Okajima ++ * Copyright (C) 2005-2013 Junjiro R. Okajima + * + * This program, aufs is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by @@ -22499,10 +22606,10 @@ +#endif /* __KERNEL__ */ +#endif /* __AUFS_SUPER_H__ */ --- a/fs/aufs/sysaufs.c 1970-01-01 01:00:00.000000000 +0100 -+++ b/fs/aufs/sysaufs.c 2012-01-10 02:15:56.569456073 +0000 ++++ b/fs/aufs/sysaufs.c 2013-02-13 14:16:11.502511808 +0000 @@ -0,0 +1,105 @@ +/* -+ * Copyright (C) 2005-2012 Junjiro R. Okajima ++ * Copyright (C) 2005-2013 Junjiro R. Okajima + * + * This program, aufs is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by @@ -22607,10 +22714,10 @@ + return err; +} --- a/fs/aufs/sysaufs.h 1970-01-01 01:00:00.000000000 +0100 -+++ b/fs/aufs/sysaufs.h 2012-01-10 02:15:56.569456073 +0000 ++++ b/fs/aufs/sysaufs.h 2013-02-13 14:16:11.502511808 +0000 @@ -0,0 +1,104 @@ +/* -+ * Copyright (C) 2005-2012 Junjiro R. Okajima ++ * Copyright (C) 2005-2013 Junjiro R. Okajima + * + * This program, aufs is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by @@ -22714,10 +22821,10 @@ +#endif /* __KERNEL__ */ +#endif /* __SYSAUFS_H__ */ --- a/fs/aufs/sysfs.c 1970-01-01 01:00:00.000000000 +0100 -+++ b/fs/aufs/sysfs.c 2012-07-22 01:31:00.166115467 +0100 ++++ b/fs/aufs/sysfs.c 2013-02-13 14:16:11.502511808 +0000 @@ -0,0 +1,257 @@ +/* -+ * Copyright (C) 2005-2012 Junjiro R. Okajima ++ * Copyright (C) 2005-2013 Junjiro R. Okajima + * + * This program, aufs is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by @@ -22974,10 +23081,10 @@ + } +} --- a/fs/aufs/sysrq.c 1970-01-01 01:00:00.000000000 +0100 -+++ b/fs/aufs/sysrq.c 2012-10-10 06:26:21.261349000 +0100 ++++ b/fs/aufs/sysrq.c 2013-02-13 14:16:11.502511808 +0000 @@ -0,0 +1,148 @@ +/* -+ * Copyright (C) 2005-2012 Junjiro R. Okajima ++ * Copyright (C) 2005-2013 Junjiro R. Okajima + * + * This program, aufs is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by @@ -23125,10 +23232,10 @@ + 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 2012-01-10 02:15:56.569456073 +0000 ++++ b/fs/aufs/vdir.c 2013-02-13 14:16:11.506511808 +0000 @@ -0,0 +1,885 @@ +/* -+ * Copyright (C) 2005-2012 Junjiro R. Okajima ++ * Copyright (C) 2005-2013 Junjiro R. Okajima + * + * This program, aufs is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by @@ -24013,10 +24120,10 @@ + return 0; +} --- a/fs/aufs/vfsub.c 1970-01-01 01:00:00.000000000 +0100 -+++ b/fs/aufs/vfsub.c 2012-10-10 06:26:21.265349041 +0100 ++++ b/fs/aufs/vfsub.c 2013-02-13 14:16:11.506511808 +0000 @@ -0,0 +1,835 @@ +/* -+ * Copyright (C) 2005-2012 Junjiro R. Okajima ++ * Copyright (C) 2005-2013 Junjiro R. Okajima + * + * This program, aufs is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by @@ -24851,10 +24958,10 @@ + return err; +} --- a/fs/aufs/vfsub.h 1970-01-01 01:00:00.000000000 +0100 -+++ b/fs/aufs/vfsub.h 2012-10-10 06:26:21.265349041 +0100 ++++ b/fs/aufs/vfsub.h 2013-02-13 14:16:11.506511808 +0000 @@ -0,0 +1,232 @@ +/* -+ * Copyright (C) 2005-2012 Junjiro R. Okajima ++ * Copyright (C) 2005-2013 Junjiro R. Okajima + * + * This program, aufs is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by @@ -25086,10 +25193,10 @@ +#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 2012-01-10 02:15:56.569456073 +0000 ++++ b/fs/aufs/wbr_policy.c 2013-02-13 14:16:11.506511808 +0000 @@ -0,0 +1,700 @@ +/* -+ * Copyright (C) 2005-2012 Junjiro R. Okajima ++ * Copyright (C) 2005-2013 Junjiro R. Okajima + * + * This program, aufs is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by @@ -25789,10 +25896,10 @@ + } +}; --- a/fs/aufs/whout.c 1970-01-01 01:00:00.000000000 +0100 -+++ b/fs/aufs/whout.c 2012-10-10 06:26:21.265349041 +0100 ++++ b/fs/aufs/whout.c 2013-02-13 14:16:11.506511808 +0000 @@ -0,0 +1,1049 @@ +/* -+ * Copyright (C) 2005-2012 Junjiro R. Okajima ++ * Copyright (C) 2005-2013 Junjiro R. Okajima + * + * This program, aufs is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by @@ -26841,10 +26948,10 @@ + } +} --- a/fs/aufs/whout.h 1970-01-01 01:00:00.000000000 +0100 -+++ b/fs/aufs/whout.h 2012-01-10 02:15:56.573456100 +0000 ++++ b/fs/aufs/whout.h 2013-02-13 14:16:11.506511808 +0000 @@ -0,0 +1,88 @@ +/* -+ * Copyright (C) 2005-2012 Junjiro R. Okajima ++ * Copyright (C) 2005-2013 Junjiro R. Okajima + * + * This program, aufs is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by @@ -26932,10 +27039,10 @@ +#endif /* __KERNEL__ */ +#endif /* __AUFS_WHOUT_H__ */ --- a/fs/aufs/wkq.c 1970-01-01 01:00:00.000000000 +0100 -+++ b/fs/aufs/wkq.c 2012-10-10 06:26:21.265349041 +0100 ++++ b/fs/aufs/wkq.c 2013-02-13 14:16:11.506511808 +0000 @@ -0,0 +1,214 @@ +/* -+ * Copyright (C) 2005-2012 Junjiro R. Okajima ++ * Copyright (C) 2005-2013 Junjiro R. Okajima + * + * This program, aufs is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by @@ -27149,10 +27256,10 @@ + return err; +} --- a/fs/aufs/wkq.h 1970-01-01 01:00:00.000000000 +0100 -+++ b/fs/aufs/wkq.h 2012-01-10 02:15:56.573456100 +0000 ++++ b/fs/aufs/wkq.h 2013-02-13 14:16:11.506511808 +0000 @@ -0,0 +1,92 @@ +/* -+ * Copyright (C) 2005-2012 Junjiro R. Okajima ++ * Copyright (C) 2005-2013 Junjiro R. Okajima + * + * This program, aufs is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by @@ -27244,10 +27351,10 @@ +#endif /* __KERNEL__ */ +#endif /* __AUFS_WKQ_H__ */ --- a/fs/aufs/xino.c 1970-01-01 01:00:00.000000000 +0100 -+++ b/fs/aufs/xino.c 2012-07-22 01:31:00.166115467 +0100 -@@ -0,0 +1,1264 @@ ++++ b/fs/aufs/xino.c 2013-02-13 14:16:11.506511808 +0000 +@@ -0,0 +1,1265 @@ +/* -+ * Copyright (C) 2005-2012 Junjiro R. Okajima ++ * Copyright (C) 2005-2013 Junjiro R. Okajima + * + * This program, aufs is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by @@ -27564,7 +27671,8 @@ + + ii_read_unlock(dir); + if (unlikely(err)) -+ pr_warn("err b%d, (%d)\n", bindex, err); ++ pr_warn("err b%d, upper %llu, (%d)\n", ++ bindex, (unsigned long long)br->br_xino_upper, err); + atomic_dec(&br->br_xino_running); + atomic_dec(&br->br_count); + si_write_unlock(sb); @@ -28511,10 +28619,10 @@ + return err; +} --- a/include/linux/aufs_type.h 1970-01-01 01:00:00.000000000 +0100 -+++ b/include/linux/aufs_type.h 2012-10-10 06:26:21.265349041 +0100 ++++ b/include/linux/aufs_type.h 2013-02-13 14:16:11.506511808 +0000 @@ -0,0 +1,233 @@ +/* -+ * Copyright (C) 2005-2012 Junjiro R. Okajima ++ * Copyright (C) 2005-2013 Junjiro R. Okajima + * + * This program, aufs is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by @@ -28554,7 +28662,7 @@ + +#include + -+#define AUFS_VERSION "3.2-20120827" ++#define AUFS_VERSION "3.2-20130204" + +/* todo? move this to linux-2.6.19/include/magic.h */ +#define AUFS_SUPER_MAGIC ('a' << 24 | 'u' << 16 | 'f' << 8 | 's')