]> git.pld-linux.org Git - packages/kernel.git/commitdiff
- partial up to 3.12(rc6); builds withtout vserver, imq and apparmor updates
authorArkadiusz Miśkiewicz <arekm@maven.pl>
Sat, 26 Oct 2013 15:40:58 +0000 (17:40 +0200)
committerArkadiusz Miśkiewicz <arekm@maven.pl>
Sat, 26 Oct 2013 15:40:58 +0000 (17:40 +0200)
kernel-aufs3.patch
kernel-multiarch.config
kernel-virtio-gl-accel.patch
kernel.spec
ovl01-vfs-add-i_op-dentry_open.patch
ovl02-vfs-export-do_splice_direct-to-modules.patch
ovl03-vfs-export-inode_permission-to-modules.patch
ovl05-overlay-filesystem.patch
ovl09-fs-limit-filesystem-stacking-depth.patch

index a93df4a68f7431228787a92cdb271f027eb31c2c..7639034f3a193eef950bb051b58598f4fa9a512e 100644 (file)
@@ -1,4 +1,4 @@
-aufs3.10 kbuild patch
+aufs3.x-rcN kbuild patch
 
 diff --git a/fs/Kconfig b/fs/Kconfig
 index c229f82..397b473 100644
@@ -22,7 +22,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 bdc6e87..349600c 100644
+index 115add2..ce305b3 100644
 --- a/include/uapi/linux/Kbuild
 +++ b/include/uapi/linux/Kbuild
 @@ -56,6 +56,7 @@ header-y += atmppp.h
@@ -33,10 +33,39 @@ index bdc6e87..349600c 100644
  header-y += auto_fs.h
  header-y += auto_fs4.h
  header-y += auxvec.h
-aufs3.10 base patch
+aufs3.x-rcN base patch
 
+diff --git a/drivers/block/loop.c b/drivers/block/loop.c
+index 40e7155..6e43ab0 100644
+--- a/drivers/block/loop.c
++++ b/drivers/block/loop.c
+@@ -691,6 +691,24 @@ static inline int is_loop_device(struct file *file)
+       return i && S_ISBLK(i->i_mode) && MAJOR(i->i_rdev) == LOOP_MAJOR;
+ }
++/*
++ * for AUFS
++ * no get/put for file.
++ */
++struct file *loop_backing_file(struct super_block *sb)
++{
++      struct file *ret;
++      struct loop_device *l;
++
++      ret = NULL;
++      if (MAJOR(sb->s_dev) == LOOP_MAJOR) {
++              l = sb->s_bdev->bd_disk->private_data;
++              ret = l->lo_backing_file;
++      }
++      return ret;
++}
++EXPORT_SYMBOL(loop_backing_file);
++
+ /* loop sysfs attributes */
+ static ssize_t loop_attr_show(struct device *dev, char *page,
 diff --git a/fs/file_table.c b/fs/file_table.c
-index 485dc0e..8db8096 100644
+index abdd15a..da0ee1e 100644
 --- a/fs/file_table.c
 +++ b/fs/file_table.c
 @@ -36,7 +36,7 @@ struct files_stat_struct files_stat = {
@@ -48,11 +77,28 @@ index 485dc0e..8db8096 100644
  
  /* SLAB cache for file structures */
  static struct kmem_cache *filp_cachep __read_mostly;
+@@ -360,7 +360,7 @@ static inline int file_list_cpu(struct file *file)
+ }
+ /* helper for file_sb_list_add to reduce ifdefs */
+-static inline void __file_sb_list_add(struct file *file, struct super_block *sb)
++inline void __file_sb_list_add(struct file *file, struct super_block *sb)
+ {
+       struct list_head *list;
+ #ifdef CONFIG_SMP
+@@ -373,6 +373,7 @@ static inline void __file_sb_list_add(struct file *file, struct super_block *sb)
+ #endif
+       list_add(&file->f_u.fu_list, list);
+ }
++EXPORT_SYMBOL(__file_sb_list_add);
+ /**
+  * file_sb_list_add - add a file to the sb's file list
 diff --git a/fs/inode.c b/fs/inode.c
-index 00d5fc3..f324521 100644
+index b33ba8e..9b24434 100644
 --- a/fs/inode.c
 +++ b/fs/inode.c
-@@ -1498,7 +1498,7 @@ static int relatime_need_update(struct vfsmount *mnt, struct inode *inode,
+@@ -1469,7 +1469,7 @@ static int relatime_need_update(struct vfsmount *mnt, struct inode *inode,
   * This does the actual work of updating an inodes time or version.  Must have
   * had called mnt_want_write() before calling this.
   */
@@ -62,7 +108,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 d37431d..987346f 100644
+index 3b7ee65..e147583 100644
 --- a/fs/splice.c
 +++ b/fs/splice.c
 @@ -1093,8 +1093,8 @@ EXPORT_SYMBOL(generic_splice_sendpage);
@@ -76,7 +122,7 @@ index d37431d..987346f 100644
  {
        ssize_t (*splice_write)(struct pipe_inode_info *, struct file *,
                                loff_t *, size_t, unsigned int);
-@@ -1124,9 +1124,9 @@ static long do_splice_from(struct pipe_inode_info *pipe, struct file *out,
+@@ -1110,9 +1110,9 @@ static long do_splice_from(struct pipe_inode_info *pipe, struct file *out,
  /*
   * Attempt to initiate a splice from a file to a pipe.
   */
@@ -90,10 +136,10 @@ index d37431d..987346f 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 65c2be2..0148214 100644
+index 3f40547..36b235e 100644
 --- a/include/linux/fs.h
 +++ b/include/linux/fs.h
-@@ -2574,6 +2574,7 @@ extern int inode_change_ok(const struct inode *, struct iattr *);
+@@ -2594,6 +2594,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);
  
@@ -116,10 +162,10 @@ index 74575cb..bfc6fb6 100644
 +                       struct pipe_inode_info *pipe, size_t len,
 +                       unsigned int flags);
  #endif
-aufs3.10 standalone patch
+aufs3.x-rcN standalone patch
 
 diff --git a/fs/file_table.c b/fs/file_table.c
-index 8db8096..e271e28 100644
+index da0ee1e..0a02e12 100644
 --- a/fs/file_table.c
 +++ b/fs/file_table.c
 @@ -37,6 +37,7 @@ struct files_stat_struct files_stat = {
@@ -130,7 +176,7 @@ index 8db8096..e271e28 100644
  
  /* SLAB cache for file structures */
  static struct kmem_cache *filp_cachep __read_mostly;
-@@ -405,6 +406,8 @@ void file_sb_list_del(struct file *file)
+@@ -410,6 +411,8 @@ void file_sb_list_del(struct file *file)
        }
  }
  
@@ -140,10 +186,10 @@ index 8db8096..e271e28 100644
  
  /*
 diff --git a/fs/inode.c b/fs/inode.c
-index f324521..bff7670 100644
+index 9b24434..6ee4b0b 100644
 --- a/fs/inode.c
 +++ b/fs/inode.c
-@@ -56,6 +56,7 @@ static struct hlist_head *inode_hashtable __read_mostly;
+@@ -57,6 +57,7 @@ static struct hlist_head *inode_hashtable __read_mostly;
  static __cacheline_aligned_in_smp DEFINE_SPINLOCK(inode_hash_lock);
  
  __cacheline_aligned_in_smp DEFINE_SPINLOCK(inode_sb_list_lock);
@@ -151,7 +197,7 @@ index f324521..bff7670 100644
  
  /*
   * Empty aops. Can be used for the cases where the user does not
-@@ -1514,6 +1515,7 @@ int update_time(struct inode *inode, struct timespec *time, int flags)
+@@ -1485,6 +1486,7 @@ int update_time(struct inode *inode, struct timespec *time, int flags)
        mark_inode_dirty_sync(inode);
        return 0;
  }
@@ -160,7 +206,7 @@ index f324521..bff7670 100644
  /**
   *    touch_atime     -       update the access time
 diff --git a/fs/namespace.c b/fs/namespace.c
-index 7b1ca9b..51db6ad 100644
+index da5c494..f40ae6f 100644
 --- a/fs/namespace.c
 +++ b/fs/namespace.c
 @@ -54,6 +54,7 @@ EXPORT_SYMBOL_GPL(fs_kobj);
@@ -179,7 +225,7 @@ index 7b1ca9b..51db6ad 100644
  
  /**
   * mnt_drop_write - give up write access to a mount
-@@ -1456,6 +1458,7 @@ int iterate_mounts(int (*f)(struct vfsmount *, void *), void *arg,
+@@ -1480,6 +1482,7 @@ int iterate_mounts(int (*f)(struct vfsmount *, void *), void *arg,
        }
        return 0;
  }
@@ -224,10 +270,10 @@ index bd2625b..2ff2a0f 100644
  int fsnotify_fasync(int fd, struct file *file, int on)
  {
 diff --git a/fs/notify/mark.c b/fs/notify/mark.c
-index fc6b49b..a6bb87d 100644
+index 923fe4a..176b435 100644
 --- a/fs/notify/mark.c
 +++ b/fs/notify/mark.c
-@@ -115,6 +115,7 @@ void fsnotify_put_mark(struct fsnotify_mark *mark)
+@@ -109,6 +109,7 @@ void fsnotify_put_mark(struct fsnotify_mark *mark)
                mark->free_mark(mark);
        }
  }
@@ -235,7 +281,7 @@ index fc6b49b..a6bb87d 100644
  
  /*
   * Any time a mark is getting freed we end up here.
-@@ -197,6 +198,7 @@ void fsnotify_destroy_mark(struct fsnotify_mark *mark,
+@@ -191,6 +192,7 @@ void fsnotify_destroy_mark(struct fsnotify_mark *mark,
        fsnotify_destroy_mark_locked(mark, group);
        mutex_unlock(&group->mark_mutex);
  }
@@ -243,7 +289,7 @@ index fc6b49b..a6bb87d 100644
  
  void fsnotify_set_mark_mask_locked(struct fsnotify_mark *mark, __u32 mask)
  {
-@@ -281,6 +283,7 @@ err:
+@@ -275,6 +277,7 @@ err:
  
        return ret;
  }
@@ -251,7 +297,7 @@ index fc6b49b..a6bb87d 100644
  
  int fsnotify_add_mark(struct fsnotify_mark *mark, struct fsnotify_group *group,
                      struct inode *inode, struct vfsmount *mnt, int allow_dups)
-@@ -342,6 +345,7 @@ void fsnotify_init_mark(struct fsnotify_mark *mark,
+@@ -336,6 +339,7 @@ void fsnotify_init_mark(struct fsnotify_mark *mark,
        atomic_set(&mark->refcnt, 1);
        mark->free_mark = free_mark;
  }
@@ -260,7 +306,7 @@ index fc6b49b..a6bb87d 100644
  static int fsnotify_mark_destroy(void *ignored)
  {
 diff --git a/fs/open.c b/fs/open.c
-index 8c74100..be563cd 100644
+index d420331..6dd3b03 100644
 --- a/fs/open.c
 +++ b/fs/open.c
 @@ -61,6 +61,7 @@ int do_truncate(struct dentry *dentry, loff_t length, unsigned int time_attrs,
@@ -272,18 +318,18 @@ index 8c74100..be563cd 100644
  long vfs_truncate(struct path *path, loff_t length)
  {
 diff --git a/fs/splice.c b/fs/splice.c
-index 987346f..8d6a045 100644
+index e147583..789f6b2 100644
 --- a/fs/splice.c
 +++ b/fs/splice.c
-@@ -1120,6 +1120,7 @@ long do_splice_from(struct pipe_inode_info *pipe, struct file *out,
-       file_end_write(out);
-       return ret;
+@@ -1106,6 +1106,7 @@ long do_splice_from(struct pipe_inode_info *pipe, struct file *out,
+       return splice_write(pipe, out, ppos, len, flags);
  }
 +EXPORT_SYMBOL(do_splice_from);
  
  /*
   * Attempt to initiate a splice from a file to a pipe.
-@@ -1146,6 +1147,7 @@ long do_splice_to(struct file *in, loff_t *ppos,
+@@ -1132,6 +1133,7 @@ long do_splice_to(struct file *in, loff_t *ppos,
  
        return splice_read(in, ppos, pipe, len, flags);
  }
@@ -292,7 +338,7 @@ index 987346f..8d6a045 100644
  /**
   * splice_direct_to_actor - splices data directly between two non-pipes
 diff --git a/security/commoncap.c b/security/commoncap.c
-index c44b6fe..d78b003 100644
+index b9d613e..ba3b618 100644
 --- a/security/commoncap.c
 +++ b/security/commoncap.c
 @@ -988,9 +988,11 @@ int cap_mmap_addr(unsigned long addr)
@@ -308,7 +354,7 @@ index c44b6fe..d78b003 100644
  }
 +EXPORT_SYMBOL(cap_mmap_file);
 diff --git a/security/device_cgroup.c b/security/device_cgroup.c
-index dd0dc57..9760ecb6 100644
+index c123628..efc6f68 100644
 --- a/security/device_cgroup.c
 +++ b/security/device_cgroup.c
 @@ -7,6 +7,7 @@
@@ -319,7 +365,7 @@ index dd0dc57..9760ecb6 100644
  #include <linux/list.h>
  #include <linux/uaccess.h>
  #include <linux/seq_file.h>
-@@ -789,6 +790,7 @@ int __devcgroup_inode_permission(struct inode *inode, int mask)
+@@ -756,6 +757,7 @@ int __devcgroup_inode_permission(struct inode *inode, int mask)
        return __devcgroup_check_permission(type, imajor(inode), iminor(inode),
                        access);
  }
@@ -328,10 +374,10 @@ index dd0dc57..9760ecb6 100644
  int devcgroup_inode_mknod(int mode, dev_t dev)
  {
 diff --git a/security/security.c b/security/security.c
-index a3dce87..06a6ea6 100644
+index 4dc31f4..1f272bc 100644
 --- a/security/security.c
 +++ b/security/security.c
-@@ -396,6 +396,7 @@ int security_path_rmdir(struct path *dir, struct dentry *dentry)
+@@ -407,6 +407,7 @@ int security_path_rmdir(struct path *dir, struct dentry *dentry)
                return 0;
        return security_ops->path_rmdir(dir, dentry);
  }
@@ -339,7 +385,7 @@ index a3dce87..06a6ea6 100644
  
  int security_path_unlink(struct path *dir, struct dentry *dentry)
  {
-@@ -412,6 +413,7 @@ int security_path_symlink(struct path *dir, struct dentry *dentry,
+@@ -423,6 +424,7 @@ int security_path_symlink(struct path *dir, struct dentry *dentry,
                return 0;
        return security_ops->path_symlink(dir, dentry, old_name);
  }
@@ -347,7 +393,7 @@ index a3dce87..06a6ea6 100644
  
  int security_path_link(struct dentry *old_dentry, struct path *new_dir,
                       struct dentry *new_dentry)
-@@ -420,6 +422,7 @@ int security_path_link(struct dentry *old_dentry, struct path *new_dir,
+@@ -431,6 +433,7 @@ int security_path_link(struct dentry *old_dentry, struct path *new_dir,
                return 0;
        return security_ops->path_link(old_dentry, new_dir, new_dentry);
  }
@@ -355,7 +401,7 @@ index a3dce87..06a6ea6 100644
  
  int security_path_rename(struct path *old_dir, struct dentry *old_dentry,
                         struct path *new_dir, struct dentry *new_dentry)
-@@ -438,6 +441,7 @@ int security_path_truncate(struct path *path)
+@@ -449,6 +452,7 @@ int security_path_truncate(struct path *path)
                return 0;
        return security_ops->path_truncate(path);
  }
@@ -363,7 +409,7 @@ index a3dce87..06a6ea6 100644
  
  int security_path_chmod(struct path *path, umode_t mode)
  {
-@@ -445,6 +449,7 @@ int security_path_chmod(struct path *path, umode_t mode)
+@@ -456,6 +460,7 @@ int security_path_chmod(struct path *path, umode_t mode)
                return 0;
        return security_ops->path_chmod(path, mode);
  }
@@ -371,7 +417,7 @@ index a3dce87..06a6ea6 100644
  
  int security_path_chown(struct path *path, kuid_t uid, kgid_t gid)
  {
-@@ -452,6 +457,7 @@ int security_path_chown(struct path *path, kuid_t uid, kgid_t gid)
+@@ -463,6 +468,7 @@ int security_path_chown(struct path *path, kuid_t uid, kgid_t gid)
                return 0;
        return security_ops->path_chown(path, uid, gid);
  }
@@ -379,7 +425,7 @@ index a3dce87..06a6ea6 100644
  
  int security_path_chroot(struct path *path)
  {
-@@ -528,6 +534,7 @@ int security_inode_readlink(struct dentry *dentry)
+@@ -539,6 +545,7 @@ int security_inode_readlink(struct dentry *dentry)
                return 0;
        return security_ops->inode_readlink(dentry);
  }
@@ -387,7 +433,7 @@ index a3dce87..06a6ea6 100644
  
  int security_inode_follow_link(struct dentry *dentry, struct nameidata *nd)
  {
-@@ -542,6 +549,7 @@ int security_inode_permission(struct inode *inode, int mask)
+@@ -553,6 +560,7 @@ int security_inode_permission(struct inode *inode, int mask)
                return 0;
        return security_ops->inode_permission(inode, mask);
  }
@@ -395,7 +441,7 @@ index a3dce87..06a6ea6 100644
  
  int security_inode_setattr(struct dentry *dentry, struct iattr *attr)
  {
-@@ -663,6 +671,7 @@ int security_file_permission(struct file *file, int mask)
+@@ -675,6 +683,7 @@ int security_file_permission(struct file *file, int mask)
  
        return fsnotify_perm(file, mask);
  }
@@ -403,7 +449,7 @@ index a3dce87..06a6ea6 100644
  
  int security_file_alloc(struct file *file)
  {
-@@ -723,6 +732,7 @@ int security_mmap_file(struct file *file, unsigned long prot,
+@@ -735,6 +744,7 @@ int security_mmap_file(struct file *file, unsigned long prot,
                return ret;
        return ima_file_mmap(file, prot);
  }
@@ -467,8 +513,8 @@ diff -urN /usr/share/empty/Documentation/ABI/testing/debugfs-aufs linux/Document
 +              will be empty. About XINO files, see the aufs manual.
 diff -urN /usr/share/empty/Documentation/ABI/testing/sysfs-aufs linux/Documentation/ABI/testing/sysfs-aufs
 --- /usr/share/empty/Documentation/ABI/testing/sysfs-aufs      1970-01-01 01:00:00.000000000 +0100
-+++ linux/Documentation/ABI/testing/sysfs-aufs 2013-07-06 13:20:47.730197761 +0200
-@@ -0,0 +1,24 @@
++++ linux/Documentation/ABI/testing/sysfs-aufs 2013-10-26 16:51:32.269706994 +0200
+@@ -0,0 +1,31 @@
 +What:         /sys/fs/aufs/si_<id>/
 +Date:         March 2009
 +Contact:      J. R. Okajima <hooanon05@yahoo.co.jp>
@@ -484,6 +530,13 @@ diff -urN /usr/share/empty/Documentation/ABI/testing/sysfs-aufs linux/Documentat
 +              It shows the abolute path of a member directory (which
 +              is called branch) in aufs, and its permission.
 +
++What:         /sys/fs/aufs/si_<id>/brid0, brid1 ... bridN
++Date:         July 2013
++Contact:      J. R. Okajima <hooanon05@yahoo.co.jp>
++Description:
++              It shows the id of a member directory (which is called
++              branch) in aufs.
++
 +What:         /sys/fs/aufs/si_<id>/xi_path
 +Date:         March 2009
 +Contact:      J. R. Okajima <hooanon05@yahoo.co.jp>
@@ -661,7 +714,7 @@ diff -urN /usr/share/empty/Documentation/filesystems/aufs/design/01intro.txt lin
 +about it. But currently I have implemented it in kernel space.
 diff -urN /usr/share/empty/Documentation/filesystems/aufs/design/02struct.txt linux/Documentation/filesystems/aufs/design/02struct.txt
 --- /usr/share/empty/Documentation/filesystems/aufs/design/02struct.txt        1970-01-01 01:00:00.000000000 +0100
-+++ linux/Documentation/filesystems/aufs/design/02struct.txt   2013-08-23 23:59:39.631583456 +0200
++++ linux/Documentation/filesystems/aufs/design/02struct.txt   2013-10-26 16:51:32.273040419 +0200
 @@ -0,0 +1,243 @@
 +
 +# Copyright (C) 2005-2013 Junjiro R. Okajima
@@ -1489,8 +1542,8 @@ diff -urN /usr/share/empty/Documentation/filesystems/aufs/design/99plan.txt linu
 +Otherwise from /new.
 diff -urN /usr/share/empty/Documentation/filesystems/aufs/README linux/Documentation/filesystems/aufs/README
 --- /usr/share/empty/Documentation/filesystems/aufs/README     1970-01-01 01:00:00.000000000 +0100
-+++ linux/Documentation/filesystems/aufs/README        2013-07-30 22:42:46.229279157 +0200
-@@ -0,0 +1,346 @@
++++ linux/Documentation/filesystems/aufs/README        2013-10-26 16:51:32.273040419 +0200
+@@ -0,0 +1,347 @@
 +
 +Aufs3 -- advanced multi layered unification filesystem version 3.x
 +http://aufs.sf.net
@@ -1819,7 +1872,8 @@ diff -urN /usr/share/empty/Documentation/filesystems/aufs/README linux/Documenta
 +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).
++"pemasu from Finland" made a donation (2013/7).
++The Parted Magic Project made a donation (2013/9).
 +
 +Thank you very much.
 +Donations are always, including future donations, very important and
@@ -1903,8 +1957,8 @@ diff -urN /usr/share/empty/fs/aufs/aufs.h linux/fs/aufs/aufs.h
 +#endif /* __AUFS_H__ */
 diff -urN /usr/share/empty/fs/aufs/branch.c linux/fs/aufs/branch.c
 --- /usr/share/empty/fs/aufs/branch.c  1970-01-01 01:00:00.000000000 +0100
-+++ linux/fs/aufs/branch.c     2013-07-30 22:42:55.839613269 +0200
-@@ -0,0 +1,1213 @@
++++ linux/fs/aufs/branch.c     2013-10-26 16:51:32.273040419 +0200
+@@ -0,0 +1,1212 @@
 +/*
 + * Copyright (C) 2005-2013 Junjiro R. Okajima
 + *
@@ -2306,7 +2360,6 @@ diff -urN /usr/share/empty/fs/aufs/branch.c linux/fs/aufs/branch.c
 +      spin_lock_init(&br->br_dykey_lock);
 +      memset(br->br_dykey, 0, sizeof(br->br_dykey));
 +      atomic_set(&br->br_count, 0);
-+      br->br_xino_upper = AUFS_XINO_TRUNC_INIT;
 +      atomic_set(&br->br_xino_running, 0);
 +      br->br_id = au_new_br_id(sb);
 +      AuDebugOn(br->br_id < 0);
@@ -2518,7 +2571,7 @@ diff -urN /usr/share/empty/fs/aufs/branch.c linux/fs/aufs/branch.c
 +              ndentry = dpage->ndentry;
 +              for (j = 0; !err && j < ndentry; j++) {
 +                      d = dpage->dentries[j];
-+                      AuDebugOn(!d->d_count);
++                      AuDebugOn(!d_count(d));
 +                      if (!au_digen_test(d, sigen)) {
 +                              di_read_lock_child(d, AuLock_IR);
 +                              if (unlikely(au_dbrange_test(d))) {
@@ -3120,8 +3173,8 @@ diff -urN /usr/share/empty/fs/aufs/branch.c linux/fs/aufs/branch.c
 +}
 diff -urN /usr/share/empty/fs/aufs/branch.h linux/fs/aufs/branch.h
 --- /usr/share/empty/fs/aufs/branch.h  1970-01-01 01:00:00.000000000 +0100
-+++ linux/fs/aufs/branch.h     2013-07-06 13:20:47.740198107 +0200
-@@ -0,0 +1,255 @@
++++ linux/fs/aufs/branch.h     2013-10-26 16:51:32.273040419 +0200
+@@ -0,0 +1,265 @@
 +/*
 + * Copyright (C) 2005-2013 Junjiro R. Okajima
 + *
@@ -3192,6 +3245,18 @@ diff -urN /usr/share/empty/fs/aufs/branch.h linux/fs/aufs/branch.h
 +};
 +#endif
 +
++/* sysfs entries */
++struct au_brsysfs {
++      char                    name[16];
++      struct attribute        attr;
++};
++
++enum {
++      AuBrSysfs_BR,
++      AuBrSysfs_BRID,
++      AuBrSysfs_Last
++};
++
 +/* protected by superblock rwsem */
 +struct au_branch {
 +      struct au_xino_file     br_xino;
@@ -3208,7 +3273,6 @@ diff -urN /usr/share/empty/fs/aufs/branch.h linux/fs/aufs/branch.h
 +      struct au_wbr           *br_wbr;
 +
 +      /* xino truncation */
-+      blkcnt_t                br_xino_upper;  /* watermark in blocks */
 +      atomic_t                br_xino_running;
 +
 +#ifdef CONFIG_AUFS_HFSNOTIFY
@@ -3216,9 +3280,8 @@ diff -urN /usr/share/empty/fs/aufs/branch.h linux/fs/aufs/branch.h
 +#endif
 +
 +#ifdef CONFIG_SYSFS
-+      /* an entry under sysfs per mount-point */
-+      char                    br_name[8];
-+      struct attribute        br_attr;
++      /* entries under sysfs per mount-point */
++      struct au_brsysfs       br_sysfs[AuBrSysfs_Last];
 +#endif
 +};
 +
@@ -3421,8 +3484,8 @@ diff -urN /usr/share/empty/fs/aufs/conf.mk linux/fs/aufs/conf.mk
 +-include ${srctree}/${src}/conf_priv.mk
 diff -urN /usr/share/empty/fs/aufs/cpup.c linux/fs/aufs/cpup.c
 --- /usr/share/empty/fs/aufs/cpup.c    1970-01-01 01:00:00.000000000 +0100
-+++ linux/fs/aufs/cpup.c       2013-08-23 23:59:39.631583456 +0200
-@@ -0,0 +1,1255 @@
++++ linux/fs/aufs/cpup.c       2013-10-26 16:51:32.273040419 +0200
+@@ -0,0 +1,1268 @@
 +/*
 + * Copyright (C) 2005-2013 Junjiro R. Okajima
 + *
@@ -3691,6 +3754,8 @@ diff -urN /usr/share/empty/fs/aufs/cpup.c linux/fs/aufs/cpup.c
 +                              wbytes -= b;
 +                              p += b;
 +                      }
++                      if (unlikely(err < 0))
++                              break;
 +              } else {
 +                      loff_t res;
 +
@@ -3782,20 +3847,20 @@ diff -urN /usr/share/empty/fs/aufs/cpup.c linux/fs/aufs/cpup.c
 +              aufs_bindex_t bindex;
 +              unsigned int flags;
 +              struct dentry *dentry;
++              int force_wr;
 +              struct file *file;
 +              void *label, *label_file;
 +      } *f, file[] = {
 +              {
 +                      .bindex = cpg->bsrc,
 +                      .flags = O_RDONLY | O_NOATIME | O_LARGEFILE,
-+                      .file = NULL,
 +                      .label = &&out,
 +                      .label_file = &&out_src
 +              },
 +              {
 +                      .bindex = cpg->bdst,
 +                      .flags = O_WRONLY | O_NOATIME | O_LARGEFILE,
-+                      .file = NULL,
++                      .force_wr = !!au_ftest_cpup(cpg->flags, RWDST),
 +                      .label = &&out_src,
 +                      .label_file = &&out_dst
 +              }
@@ -3808,7 +3873,7 @@ diff -urN /usr/share/empty/fs/aufs/cpup.c linux/fs/aufs/cpup.c
 +      for (i = 0; i < 2; i++, f++) {
 +              f->dentry = au_h_dptr(cpg->dentry, f->bindex);
 +              f->file = au_h_open(cpg->dentry, f->bindex, f->flags,
-+                                  /*file*/NULL);
++                                  /*file*/NULL, f->force_wr);
 +              err = PTR_ERR(f->file);
 +              if (IS_ERR(f->file))
 +                      goto *f->label;
@@ -3999,23 +4064,35 @@ diff -urN /usr/share/empty/fs/aufs/cpup.c linux/fs/aufs/cpup.c
 +      return err;
 +}
 +
-+static int au_do_ren_after_cpup(struct dentry *dentry, aufs_bindex_t bdst,
-+                              struct path *h_path)
++static int au_do_ren_after_cpup(struct au_cp_generic *cpg, struct path *h_path)
 +{
 +      int err;
-+      struct dentry *h_dentry, *h_parent;
++      struct dentry *dentry, *h_dentry, *h_parent, *parent;
 +      struct inode *h_dir;
++      aufs_bindex_t bdst;
 +
-+      h_dentry = dget(au_h_dptr(dentry, bdst));
-+      au_set_h_dptr(dentry, bdst, NULL);
-+      err = au_lkup_neg(dentry, bdst, /*wh*/0);
-+      if (unlikely(err)) {
++      dentry = cpg->dentry;
++      bdst = cpg->bdst;
++      h_dentry = au_h_dptr(dentry, bdst);
++      if (!au_ftest_cpup(cpg->flags, OVERWRITE)) {
++              dget(h_dentry);
++              au_set_h_dptr(dentry, bdst, NULL);
++              err = au_lkup_neg(dentry, bdst, /*wh*/0);
++              if (!err)
++                      h_path->dentry = dget(au_h_dptr(dentry, bdst));
 +              au_set_h_dptr(dentry, bdst, h_dentry);
-+              goto out;
++      } else {
++              err = 0;
++              parent = dget_parent(dentry);
++              h_parent = au_h_dptr(parent, bdst);
++              dput(parent);
++              h_path->dentry = vfsub_lkup_one(&dentry->d_name, h_parent);
++              if (IS_ERR(h_path->dentry))
++                      err = PTR_ERR(h_path->dentry);
 +      }
++      if (unlikely(err))
++              goto out;
 +
-+      h_path->dentry = dget(au_h_dptr(dentry, bdst));
-+      au_set_h_dptr(dentry, bdst, h_dentry);
 +      h_parent = h_dentry->d_parent; /* dir inode is locked */
 +      h_dir = h_parent->d_inode;
 +      IMustLock(h_dir);
@@ -4107,8 +4184,7 @@ diff -urN /usr/share/empty/fs/aufs/cpup.c linux/fs/aufs/cpup.c
 +                      a->h_path.dentry = h_dst;
 +                      err = vfsub_link(h_src, h_dir, &a->h_path);
 +                      if (!err && au_ftest_cpup(cpg->flags, RENAME))
-+                              err = au_do_ren_after_cpup
-+                                      (cpg->dentry, cpg->bdst, &a->h_path);
++                              err = au_do_ren_after_cpup(cpg, &a->h_path);
 +                      if (do_dt)
 +                              au_dtime_revert(&a->dt);
 +                      dput(h_src);
@@ -4166,7 +4242,7 @@ diff -urN /usr/share/empty/fs/aufs/cpup.c linux/fs/aufs/cpup.c
 +
 +      if (au_ftest_cpup(cpg->flags, RENAME)) {
 +              a->h_path.dentry = h_dst;
-+              err = au_do_ren_after_cpup(cpg->dentry, cpg->bdst, &a->h_path);
++              err = au_do_ren_after_cpup(cpg, &a->h_path);
 +      }
 +      if (!err)
 +              goto out_parent; /* success */
@@ -4332,7 +4408,7 @@ diff -urN /usr/share/empty/fs/aufs/cpup.c linux/fs/aufs/cpup.c
 +      h_file = NULL;
 +      if (au_ftest_cpup(cpg->flags, HOPEN)) {
 +              AuDebugOn(cpg->bsrc < 0);
-+              h_file = au_h_open_pre(dentry, cpg->bsrc);
++              h_file = au_h_open_pre(dentry, cpg->bsrc, /*force_wr*/0);
 +              err = PTR_ERR(h_file);
 +              if (IS_ERR(h_file))
 +                      goto out;
@@ -4680,8 +4756,8 @@ diff -urN /usr/share/empty/fs/aufs/cpup.c linux/fs/aufs/cpup.c
 +}
 diff -urN /usr/share/empty/fs/aufs/cpup.h linux/fs/aufs/cpup.h
 --- /usr/share/empty/fs/aufs/cpup.h    1970-01-01 01:00:00.000000000 +0100
-+++ linux/fs/aufs/cpup.h       2013-08-23 23:59:39.634916914 +0200
-@@ -0,0 +1,90 @@
++++ linux/fs/aufs/cpup.h       2013-10-26 16:51:32.273040419 +0200
+@@ -0,0 +1,95 @@
 +/*
 + * Copyright (C) 2005-2013 Junjiro R. Okajima
 + *
@@ -4733,11 +4809,16 @@ diff -urN /usr/share/empty/fs/aufs/cpup.h linux/fs/aufs/cpup.h
 +};
 +
 +/* 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 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 AuCpup_OVERWRITE      (1 << 4)        /* allow overwriting the
++                                                 existing entry */
++#define AuCpup_RWDST          (1 << 5)        /* force write target even if
++                                                 the branch is marked as RO */
 +
 +#define au_ftest_cpup(flags, name)    ((flags) & AuCpup_##name)
 +#define au_fset_cpup(flags, name) \
@@ -5264,7 +5345,7 @@ diff -urN /usr/share/empty/fs/aufs/dbgaufs.h linux/fs/aufs/dbgaufs.h
 +#endif /* __DBGAUFS_H__ */
 diff -urN /usr/share/empty/fs/aufs/dcsub.c linux/fs/aufs/dcsub.c
 --- /usr/share/empty/fs/aufs/dcsub.c   1970-01-01 01:00:00.000000000 +0100
-+++ linux/fs/aufs/dcsub.c      2013-07-30 22:42:55.839613269 +0200
++++ linux/fs/aufs/dcsub.c      2013-10-26 16:51:29.579631476 +0200
 @@ -0,0 +1,243 @@
 +/*
 + * Copyright (C) 2005-2013 Junjiro R. Okajima
@@ -5366,7 +5447,7 @@ diff -urN /usr/share/empty/fs/aufs/dcsub.c linux/fs/aufs/dcsub.c
 +              dpages->ndpage++;
 +      }
 +
-+      AuDebugOn(!dentry->d_count);
++      AuDebugOn(!d_count(dentry));
 +      dpage->dentries[dpage->ndentry++] = dget_dlock(dentry);
 +      return 0; /* success */
 +
@@ -5392,7 +5473,7 @@ diff -urN /usr/share/empty/fs/aufs/dcsub.c linux/fs/aufs/dcsub.c
 +      if (this_parent->d_sb == sb
 +          && !IS_ROOT(this_parent)
 +          && au_di(this_parent)
-+          && this_parent->d_count
++          && d_count(this_parent)
 +          && (!test || test(this_parent, arg))) {
 +              err = au_dpages_append(dpages, this_parent, GFP_ATOMIC);
 +              if (unlikely(err))
@@ -5406,7 +5487,7 @@ diff -urN /usr/share/empty/fs/aufs/dcsub.c linux/fs/aufs/dcsub.c
 +
 +              next = tmp->next;
 +              spin_lock_nested(&dentry->d_lock, DENTRY_D_LOCK_NESTED);
-+              if (dentry->d_count) {
++              if (d_count(dentry)) {
 +                      if (!list_empty(&dentry->d_subdirs)) {
 +                              spin_unlock(&this_parent->d_lock);
 +                              spin_release(&dentry->d_lock.dep_map, 1,
@@ -5457,7 +5538,7 @@ diff -urN /usr/share/empty/fs/aufs/dcsub.c linux/fs/aufs/dcsub.c
 +      write_seqlock(&rename_lock);
 +      spin_lock(&dentry->d_lock);
 +      if (do_include
-+          && dentry->d_count
++          && d_count(dentry)
 +          && (!test || test(dentry, arg)))
 +              err = au_dpages_append(dpages, dentry, GFP_ATOMIC);
 +      spin_unlock(&dentry->d_lock);
@@ -5471,7 +5552,7 @@ diff -urN /usr/share/empty/fs/aufs/dcsub.c linux/fs/aufs/dcsub.c
 +      while (!IS_ROOT(dentry)) {
 +              dentry = dentry->d_parent; /* rename_lock is locked */
 +              spin_lock(&dentry->d_lock);
-+              if (dentry->d_count
++              if (d_count(dentry)
 +                  && (!test || test(dentry, arg)))
 +                      err = au_dpages_append(dpages, dentry, GFP_ATOMIC);
 +              spin_unlock(&dentry->d_lock);
@@ -5609,8 +5690,8 @@ diff -urN /usr/share/empty/fs/aufs/dcsub.h linux/fs/aufs/dcsub.h
 +#endif /* __AUFS_DCSUB_H__ */
 diff -urN /usr/share/empty/fs/aufs/debug.c linux/fs/aufs/debug.c
 --- /usr/share/empty/fs/aufs/debug.c   1970-01-01 01:00:00.000000000 +0100
-+++ linux/fs/aufs/debug.c      2013-08-23 23:59:39.634916914 +0200
-@@ -0,0 +1,491 @@
++++ linux/fs/aufs/debug.c      2013-10-26 16:51:32.273040419 +0200
+@@ -0,0 +1,518 @@
 +/*
 + * Copyright (C) 2005-2013 Junjiro R. Okajima
 + *
@@ -5636,9 +5717,39 @@ diff -urN /usr/share/empty/fs/aufs/debug.c linux/fs/aufs/debug.c
 +#include <linux/vt_kern.h>
 +#include "aufs.h"
 +
-+int aufs_debug;
++/* Returns 0, or -errno.  arg is in kp->arg. */
++static int param_atomic_t_set(const char *val, const struct kernel_param *kp)
++{
++      int err, n;
++
++      err = kstrtoint(val, 0, &n);
++      if (!err) {
++              if (n > 0)
++                      au_debug_on();
++              else
++                      au_debug_off();
++      }
++      return err;
++}
++
++/* Returns length written or -errno.  Buffer is 4k (ie. be short!) */
++static int param_atomic_t_get(char *buffer, const struct kernel_param *kp)
++{
++      atomic_t *a;
++
++      a = kp->arg;
++      return sprintf(buffer, "%d", atomic_read(a));
++}
++
++static struct kernel_param_ops param_ops_atomic_t = {
++      .set = param_atomic_t_set,
++      .get = param_atomic_t_get
++      /* void (*free)(void *arg) */
++};
++
++atomic_t aufs_debug = ATOMIC_INIT(0);
 +MODULE_PARM_DESC(debug, "debug print");
-+module_param_named(debug, aufs_debug, int, S_IRUGO | S_IWUSR | S_IWGRP);
++module_param_named(debug, aufs_debug, atomic_t, S_IRUGO | S_IWUSR | S_IWGRP);
 +
 +char *au_plevel = KERN_DEBUG;
 +#define dpri(fmt, ...) do {                                   \
@@ -5772,7 +5883,7 @@ diff -urN /usr/share/empty/fs/aufs/debug.c linux/fs/aufs/debug.c
 +           bindex,
 +           AuDLNPair(dentry->d_parent), AuDLNPair(dentry),
 +           dentry->d_sb ? au_sbtype(dentry->d_sb) : "??",
-+           dentry->d_count, dentry->d_flags);
++           d_count(dentry), dentry->d_flags);
 +      hn = -1;
 +      if (bindex >= 0 && dentry->d_inode && au_test_aufs(dentry->d_sb)) {
 +              struct au_iinfo *iinfo = au_ii(dentry->d_inode);
@@ -5991,14 +6102,11 @@ diff -urN /usr/share/empty/fs/aufs/debug.c linux/fs/aufs/debug.c
 +                      continue;
 +              h_inode = au_h_iptr(inode, bindex);
 +              if (unlikely(h_inode != h_dentry->d_inode)) {
-+                      int old = au_debug_test();
-+                      if (!old)
-+                              au_debug(1);
++                      au_debug_on();
 +                      AuDbg("b%d, %s:%d\n", bindex, func, line);
 +                      AuDbgDentry(dentry);
 +                      AuDbgInode(inode);
-+                      if (!old)
-+                              au_debug(0);
++                      au_debug_off();
 +                      BUG();
 +              }
 +      }
@@ -6104,8 +6212,8 @@ diff -urN /usr/share/empty/fs/aufs/debug.c linux/fs/aufs/debug.c
 +}
 diff -urN /usr/share/empty/fs/aufs/debug.h linux/fs/aufs/debug.h
 --- /usr/share/empty/fs/aufs/debug.h   1970-01-01 01:00:00.000000000 +0100
-+++ linux/fs/aufs/debug.h      2013-07-06 13:20:47.740198107 +0200
-@@ -0,0 +1,242 @@
++++ linux/fs/aufs/debug.h      2013-10-26 16:51:32.273040419 +0200
+@@ -0,0 +1,249 @@
 +/*
 + * Copyright (C) 2005-2013 Junjiro R. Okajima
 + *
@@ -6133,6 +6241,7 @@ diff -urN /usr/share/empty/fs/aufs/debug.h linux/fs/aufs/debug.h
 +
 +#ifdef __KERNEL__
 +
++#include <linux/atomic.h>
 +#include <linux/module.h>
 +#include <linux/kallsyms.h>
 +#include <linux/sysrq.h>
@@ -6141,23 +6250,29 @@ diff -urN /usr/share/empty/fs/aufs/debug.h linux/fs/aufs/debug.h
 +#define AuDebugOn(a)          BUG_ON(a)
 +
 +/* module parameter */
-+extern int aufs_debug;
-+static inline void au_debug(int n)
++extern atomic_t aufs_debug;
++static inline void au_debug_on(void)
 +{
-+      aufs_debug = n;
-+      smp_mb();
++      atomic_inc(&aufs_debug);
++}
++static inline void au_debug_off(void)
++{
++      atomic_dec_if_positive(&aufs_debug);
 +}
 +
 +static inline int au_debug_test(void)
 +{
-+      return aufs_debug;
++      return atomic_read(&aufs_debug) > 0;
 +}
 +#else
 +#define AuDebugOn(a)          do {} while (0)
-+AuStubVoid(au_debug, int n)
++AuStubVoid(au_debug_on, void)
++AuStubVoid(au_debug_off, void)
 +AuStubInt0(au_debug_test, void)
 +#endif /* CONFIG_AUFS_DEBUG */
 +
++#define param_check_atomic_t(name, p) __param_check(name, p, atomic_t)
++
 +/* ---------------------------------------------------------------------- */
 +
 +/* debug print */
@@ -7657,7 +7772,7 @@ diff -urN /usr/share/empty/fs/aufs/dentry.h linux/fs/aufs/dentry.h
 +#endif /* __AUFS_DENTRY_H__ */
 diff -urN /usr/share/empty/fs/aufs/dinfo.c linux/fs/aufs/dinfo.c
 --- /usr/share/empty/fs/aufs/dinfo.c   1970-01-01 01:00:00.000000000 +0100
-+++ linux/fs/aufs/dinfo.c      2013-07-30 22:42:55.839613269 +0200
++++ linux/fs/aufs/dinfo.c      2013-10-26 16:51:29.579631476 +0200
 @@ -0,0 +1,543 @@
 +/*
 + * Copyright (C) 2005-2013 Junjiro R. Okajima
@@ -7979,7 +8094,7 @@ diff -urN /usr/share/empty/fs/aufs/dinfo.c linux/fs/aufs/dinfo.c
 +              return NULL;
 +      AuDebugOn(bindex < 0);
 +      d = au_di(dentry)->di_hdentry[0 + bindex].hd_dentry;
-+      AuDebugOn(d && d->d_count <= 0);
++      AuDebugOn(d && d_count(d) <= 0);
 +      return d;
 +}
 +
@@ -8204,8 +8319,8 @@ diff -urN /usr/share/empty/fs/aufs/dinfo.c linux/fs/aufs/dinfo.c
 +}
 diff -urN /usr/share/empty/fs/aufs/dir.c linux/fs/aufs/dir.c
 --- /usr/share/empty/fs/aufs/dir.c     1970-01-01 01:00:00.000000000 +0100
-+++ linux/fs/aufs/dir.c        2013-07-30 22:42:55.839613269 +0200
-@@ -0,0 +1,632 @@
++++ linux/fs/aufs/dir.c        2013-10-26 16:51:32.273040419 +0200
+@@ -0,0 +1,645 @@
 +/*
 + * Copyright (C) 2005-2013 Junjiro R. Okajima
 + *
@@ -8337,7 +8452,7 @@ diff -urN /usr/share/empty/fs/aufs/dir.c linux/fs/aufs/dir.c
 +              if (h_file)
 +                      continue;
 +
-+              h_file = au_h_open(dentry, bindex, flags, file);
++              h_file = au_h_open(dentry, bindex, flags, file, /*force_wr*/0);
 +              err = PTR_ERR(h_file);
 +              if (IS_ERR(h_file))
 +                      goto out; /* close all? */
@@ -8376,7 +8491,7 @@ diff -urN /usr/share/empty/fs/aufs/dir.c linux/fs/aufs/dir.c
 +              if (!h_dentry)
 +                      continue;
 +
-+              h_file = au_h_open(dentry, bindex, flags, file);
++              h_file = au_h_open(dentry, bindex, flags, file, /*force_wr*/0);
 +              if (IS_ERR(h_file)) {
 +                      err = PTR_ERR(h_file);
 +                      break;
@@ -8566,13 +8681,16 @@ diff -urN /usr/share/empty/fs/aufs/dir.c linux/fs/aufs/dir.c
 +
 +/* ---------------------------------------------------------------------- */
 +
-+static int aufs_readdir(struct file *file, void *dirent, filldir_t filldir)
++static int aufs_iterate(struct file *file, struct dir_context *ctx)
 +{
 +      int err;
 +      struct dentry *dentry;
 +      struct inode *inode, *h_inode;
 +      struct super_block *sb;
 +
++      AuDbg("%.*s, ctx{%pf, %llu}\n",
++            AuDLNPair(file->f_dentry), ctx->actor, ctx->pos);
++
 +      dentry = file->f_dentry;
 +      inode = dentry->d_inode;
 +      IMustLock(inode);
@@ -8591,7 +8709,7 @@ diff -urN /usr/share/empty/fs/aufs/dir.c linux/fs/aufs/dir.c
 +
 +      h_inode = au_h_iptr(inode, au_ibstart(inode));
 +      if (!au_test_nfsd()) {
-+              err = au_vdir_fill_de(file, dirent, filldir);
++              err = au_vdir_fill_de(file, ctx);
 +              fsstack_copy_attr_atime(inode, h_inode);
 +      } else {
 +              /*
@@ -8601,7 +8719,7 @@ diff -urN /usr/share/empty/fs/aufs/dir.c linux/fs/aufs/dir.c
 +              atomic_inc(&h_inode->i_count);
 +              di_read_unlock(dentry, AuLock_IR);
 +              si_read_unlock(sb);
-+              err = au_vdir_fill_de(file, dirent, filldir);
++              err = au_vdir_fill_de(file, ctx);
 +              fsstack_copy_attr_atime(inode, h_inode);
 +              fi_write_unlock(file);
 +              iput(h_inode);
@@ -8635,17 +8753,19 @@ diff -urN /usr/share/empty/fs/aufs/dir.c linux/fs/aufs/dir.c
 +#endif
 +
 +struct test_empty_arg {
++      struct dir_context ctx;
 +      struct au_nhash *whlist;
 +      unsigned int flags;
 +      int err;
 +      aufs_bindex_t bindex;
 +};
 +
-+static int test_empty_cb(void *__arg, const char *__name, int namelen,
-+                       loff_t offset __maybe_unused, u64 ino,
++static int test_empty_cb(struct dir_context *ctx, const char *__name,
++                       int namelen, loff_t offset __maybe_unused, u64 ino,
 +                       unsigned int d_type)
 +{
-+      struct test_empty_arg *arg = __arg;
++      struct test_empty_arg *arg = container_of(ctx, struct test_empty_arg,
++                                                ctx);
 +      char *name = (void *)__name;
 +
 +      arg->err = 0;
@@ -8683,7 +8803,7 @@ diff -urN /usr/share/empty/fs/aufs/dir.c linux/fs/aufs/dir.c
 +
 +      h_file = au_h_open(dentry, arg->bindex,
 +                         O_RDONLY | O_NONBLOCK | O_DIRECTORY | O_LARGEFILE,
-+                         /*file*/NULL);
++                         /*file*/NULL, /*force_wr*/0);
 +      err = PTR_ERR(h_file);
 +      if (IS_ERR(h_file))
 +              goto out;
@@ -8697,7 +8817,7 @@ diff -urN /usr/share/empty/fs/aufs/dir.c linux/fs/aufs/dir.c
 +              arg->err = 0;
 +              au_fclr_testempty(arg->flags, CALLED);
 +              /* smp_mb(); */
-+              err = vfsub_readdir(h_file, test_empty_cb, arg);
++              err = vfsub_iterate_dir(h_file, &arg->ctx);
 +              if (err >= 0)
 +                      err = arg->err;
 +      } while (!err && au_ftest_testempty(arg->flags, CALLED));
@@ -8758,7 +8878,11 @@ diff -urN /usr/share/empty/fs/aufs/dir.c linux/fs/aufs/dir.c
 +      unsigned int rdhash;
 +      aufs_bindex_t bindex, bstart, btail;
 +      struct au_nhash whlist;
-+      struct test_empty_arg arg;
++      struct test_empty_arg arg = {
++              .ctx = {
++                      .actor = au_diractor(test_empty_cb)
++              }
++      };
 +
 +      SiMustAnyLock(dentry->d_sb);
 +
@@ -8800,7 +8924,11 @@ diff -urN /usr/share/empty/fs/aufs/dir.c linux/fs/aufs/dir.c
 +int au_test_empty(struct dentry *dentry, struct au_nhash *whlist)
 +{
 +      int err;
-+      struct test_empty_arg arg;
++      struct test_empty_arg arg = {
++              .ctx = {
++                      .actor = au_diractor(test_empty_cb)
++              }
++      };
 +      aufs_bindex_t bindex, btail;
 +
 +      err = 0;
@@ -8828,7 +8956,7 @@ diff -urN /usr/share/empty/fs/aufs/dir.c linux/fs/aufs/dir.c
 +      .owner          = THIS_MODULE,
 +      .llseek         = default_llseek,
 +      .read           = generic_read_dir,
-+      .readdir        = aufs_readdir,
++      .iterate        = aufs_iterate,
 +      .unlocked_ioctl = aufs_ioctl_dir,
 +#ifdef CONFIG_COMPAT
 +      .compat_ioctl   = aufs_compat_ioctl_dir,
@@ -8840,7 +8968,7 @@ diff -urN /usr/share/empty/fs/aufs/dir.c linux/fs/aufs/dir.c
 +};
 diff -urN /usr/share/empty/fs/aufs/dir.h linux/fs/aufs/dir.h
 --- /usr/share/empty/fs/aufs/dir.h     1970-01-01 01:00:00.000000000 +0100
-+++ linux/fs/aufs/dir.h        2013-07-30 22:42:55.839613269 +0200
++++ linux/fs/aufs/dir.h        2013-10-26 16:51:29.582964925 +0200
 @@ -0,0 +1,137 @@
 +/*
 + * Copyright (C) 2005-2013 Junjiro R. Okajima
@@ -8950,7 +9078,7 @@ diff -urN /usr/share/empty/fs/aufs/dir.h linux/fs/aufs/dir.h
 +                     unsigned char shwh);
 +void au_vdir_free(struct au_vdir *vdir);
 +int au_vdir_init(struct file *file);
-+int au_vdir_fill_de(struct file *file, void *dirent, filldir_t filldir);
++int au_vdir_fill_de(struct file *file, struct dir_context *ctx);
 +
 +/* ioctl.c */
 +long aufs_ioctl_dir(struct file *file, unsigned int cmd, unsigned long arg);
@@ -8981,8 +9109,8 @@ diff -urN /usr/share/empty/fs/aufs/dir.h linux/fs/aufs/dir.h
 +#endif /* __AUFS_DIR_H__ */
 diff -urN /usr/share/empty/fs/aufs/dynop.c linux/fs/aufs/dynop.c
 --- /usr/share/empty/fs/aufs/dynop.c   1970-01-01 01:00:00.000000000 +0100
-+++ linux/fs/aufs/dynop.c      2013-07-30 22:42:55.839613269 +0200
-@@ -0,0 +1,379 @@
++++ linux/fs/aufs/dynop.c      2013-10-26 16:51:29.582964925 +0200
+@@ -0,0 +1,380 @@
 +/*
 + * Copyright (C) 2010-2013 Junjiro R. Okajima
 + *
@@ -9178,6 +9306,7 @@ diff -urN /usr/share/empty/fs/aufs/dynop.c linux/fs/aufs/dynop.c
 +      DySetAop(migratepage);
 +      DySetAop(launder_page);
 +      DySetAop(is_partially_uptodate);
++      DySetAop(is_dirty_writeback);
 +      DySetAop(error_remove_page);
 +      DySetAop(swap_activate);
 +      DySetAop(swap_deactivate);
@@ -9444,8 +9573,8 @@ diff -urN /usr/share/empty/fs/aufs/dynop.h linux/fs/aufs/dynop.h
 +#endif /* __AUFS_DYNOP_H__ */
 diff -urN /usr/share/empty/fs/aufs/export.c linux/fs/aufs/export.c
 --- /usr/share/empty/fs/aufs/export.c  1970-01-01 01:00:00.000000000 +0100
-+++ linux/fs/aufs/export.c     2013-07-30 22:42:55.839613269 +0200
-@@ -0,0 +1,826 @@
++++ linux/fs/aufs/export.c     2013-10-26 16:51:29.582964925 +0200
+@@ -0,0 +1,832 @@
 +/*
 + * Copyright (C) 2005-2013 Junjiro R. Okajima
 + *
@@ -9789,6 +9918,7 @@ diff -urN /usr/share/empty/fs/aufs/export.c linux/fs/aufs/export.c
 +}
 +
 +struct find_name_by_ino {
++      struct dir_context ctx;
 +      int called, found;
 +      ino_t ino;
 +      char *name;
@@ -9796,10 +9926,11 @@ diff -urN /usr/share/empty/fs/aufs/export.c linux/fs/aufs/export.c
 +};
 +
 +static int
-+find_name_by_ino(void *arg, const char *name, int namelen, loff_t offset,
-+               u64 ino, unsigned int d_type)
++find_name_by_ino(struct dir_context *ctx, const char *name, int namelen,
++               loff_t offset, u64 ino, unsigned int d_type)
 +{
-+      struct find_name_by_ino *a = arg;
++      struct find_name_by_ino *a = container_of(ctx, struct find_name_by_ino,
++                                                ctx);
 +
 +      a->called++;
 +      if (a->ino != ino)
@@ -9817,7 +9948,11 @@ diff -urN /usr/share/empty/fs/aufs/export.c linux/fs/aufs/export.c
 +      struct dentry *dentry, *parent;
 +      struct file *file;
 +      struct inode *dir;
-+      struct find_name_by_ino arg;
++      struct find_name_by_ino arg = {
++              .ctx = {
++                      .actor = au_diractor(find_name_by_ino)
++              }
++      };
 +      int err;
 +
 +      parent = path->dentry;
@@ -9837,7 +9972,7 @@ diff -urN /usr/share/empty/fs/aufs/export.c linux/fs/aufs/export.c
 +      do {
 +              arg.called = 0;
 +              /* smp_mb(); */
-+              err = vfsub_readdir(file, find_name_by_ino, &arg);
++              err = vfsub_iterate_dir(file, &arg.ctx);
 +      } while (!err && !arg.found && arg.called);
 +      dentry = ERR_PTR(err);
 +      if (unlikely(err))
@@ -10274,8 +10409,8 @@ diff -urN /usr/share/empty/fs/aufs/export.c linux/fs/aufs/export.c
 +}
 diff -urN /usr/share/empty/fs/aufs/file.c linux/fs/aufs/file.c
 --- /usr/share/empty/fs/aufs/file.c    1970-01-01 01:00:00.000000000 +0100
-+++ linux/fs/aufs/file.c       2013-08-23 23:59:39.634916914 +0200
-@@ -0,0 +1,708 @@
++++ linux/fs/aufs/file.c       2013-10-26 16:51:32.273040419 +0200
+@@ -0,0 +1,725 @@
 +/*
 + * Copyright (C) 2005-2013 Junjiro R. Okajima
 + *
@@ -10314,7 +10449,7 @@ diff -urN /usr/share/empty/fs/aufs/file.c linux/fs/aufs/file.c
 +
 +/* common functions to regular file and dir */
 +struct file *au_h_open(struct dentry *dentry, aufs_bindex_t bindex, int flags,
-+                     struct file *file)
++                     struct file *file, int force_wr)
 +{
 +      struct file *h_file;
 +      struct dentry *h_dentry;
@@ -10349,8 +10484,20 @@ diff -urN /usr/share/empty/fs/aufs/file.c linux/fs/aufs/file.c
 +              goto out;
 +
 +      /* drop flags for writing */
-+      if (au_test_ro(sb, bindex, dentry->d_inode))
++      if (au_test_ro(sb, bindex, dentry->d_inode)) {
++              if (force_wr && !(flags & O_WRONLY))
++                      force_wr = 0;
 +              flags = au_file_roflags(flags);
++              if (force_wr) {
++                      h_file = ERR_PTR(-EROFS);
++                      flags = au_file_roflags(flags);
++                      if (unlikely(vfsub_native_ro(h_inode)
++                                   || IS_APPEND(h_inode)))
++                              goto out;
++                      flags &= ~O_ACCMODE;
++                      flags |= O_WRONLY;
++              }
++      }
 +      flags &= ~O_CREAT;
 +      atomic_inc(&br->br_count);
 +      h_path.dentry = h_dentry;
@@ -10445,7 +10592,7 @@ diff -urN /usr/share/empty/fs/aufs/file.c linux/fs/aufs/file.c
 +      /* AuDebugOn(au_fbstart(file) < bstart); */
 +
 +      h_file = au_h_open(dentry, bstart, vfsub_file_flags(file) & ~O_TRUNC,
-+                         file);
++                         file, /*force_wr*/0);
 +      err = PTR_ERR(h_file);
 +      if (IS_ERR(h_file)) {
 +              if (h_file_tmp) {
@@ -10595,7 +10742,7 @@ diff -urN /usr/share/empty/fs/aufs/file.c linux/fs/aufs/file.c
 +      if (dbstart <= cpg.bdst         /* just reopen */
 +          || !d_unhashed(cpg.dentry)  /* copyup and reopen */
 +              ) {
-+              h_file = au_h_open_pre(cpg.dentry, cpg.bsrc);
++              h_file = au_h_open_pre(cpg.dentry, cpg.bsrc, /*force_wr*/0);
 +              if (IS_ERR(h_file))
 +                      err = PTR_ERR(h_file);
 +              else {
@@ -10939,7 +11086,8 @@ diff -urN /usr/share/empty/fs/aufs/file.c linux/fs/aufs/file.c
 +
 +static int aufs_set_page_dirty(struct page *page)
 +{ AuUnsupport(); return 0; }
-+static void aufs_invalidatepage(struct page *page, unsigned long offset)
++static void aufs_invalidatepage(struct page *page, unsigned int offset,
++                              unsigned int length)
 +{ AuUnsupport(); }
 +static int aufs_releasepage(struct page *page, gfp_t gfp)
 +{ AuUnsupport(); return 0; }
@@ -10952,6 +11100,9 @@ diff -urN /usr/share/empty/fs/aufs/file.c linux/fs/aufs/file.c
 +                                    read_descriptor_t *desc,
 +                                    unsigned long from)
 +{ AuUnsupport(); return 0; }
++static void aufs_is_dirty_writeback(struct page *page, bool *dirty,
++                                  bool *writeback)
++{ AuUnsupport(); }
 +static int aufs_error_remove_page(struct address_space *mapping,
 +                                struct page *page)
 +{ AuUnsupport(); return 0; }
@@ -10979,6 +11130,7 @@ diff -urN /usr/share/empty/fs/aufs/file.c linux/fs/aufs/file.c
 +      .migratepage            = aufs_migratepage,
 +      .launder_page           = aufs_launder_page,
 +      .is_partially_uptodate  = aufs_is_partially_uptodate,
++      .is_dirty_writeback     = aufs_is_dirty_writeback,
 +      .error_remove_page      = aufs_error_remove_page,
 +      .swap_activate          = aufs_swap_activate,
 +      .swap_deactivate        = aufs_swap_deactivate
@@ -10986,8 +11138,8 @@ diff -urN /usr/share/empty/fs/aufs/file.c linux/fs/aufs/file.c
 +};
 diff -urN /usr/share/empty/fs/aufs/file.h linux/fs/aufs/file.h
 --- /usr/share/empty/fs/aufs/file.h    1970-01-01 01:00:00.000000000 +0100
-+++ linux/fs/aufs/file.h       2013-08-23 23:59:39.634916914 +0200
-@@ -0,0 +1,310 @@
++++ linux/fs/aufs/file.h       2013-10-26 16:51:32.273040419 +0200
+@@ -0,0 +1,312 @@
 +/*
 + * Copyright (C) 2005-2013 Junjiro R. Okajima
 + *
@@ -11060,7 +11212,7 @@ diff -urN /usr/share/empty/fs/aufs/file.h linux/fs/aufs/file.h
 +extern const struct address_space_operations aufs_aop;
 +unsigned int au_file_roflags(unsigned int flags);
 +struct file *au_h_open(struct dentry *dentry, aufs_bindex_t bindex, int flags,
-+                     struct file *file);
++                     struct file *file, int force_wr);
 +int au_do_open(struct file *file, int (*open)(struct file *file, int flags),
 +             struct au_fidir *fidir);
 +int au_reopen_nondir(struct file *file);
@@ -11078,12 +11230,14 @@ diff -urN /usr/share/empty/fs/aufs/file.h linux/fs/aufs/file.h
 +
 +#ifdef CONFIG_AUFS_BR_HFSPLUS
 +/* hfsplus.c */
-+struct file *au_h_open_pre(struct dentry *dentry, aufs_bindex_t bindex);
++struct file *au_h_open_pre(struct dentry *dentry, aufs_bindex_t bindex,
++                         int force_wr);
 +void au_h_open_post(struct dentry *dentry, aufs_bindex_t bindex,
 +                  struct file *h_file);
 +#else
 +static inline
-+struct file *au_h_open_pre(struct dentry *dentry, aufs_bindex_t bindex)
++struct file *au_h_open_pre(struct dentry *dentry, aufs_bindex_t bindex,
++                         int force_wr)
 +{
 +      return NULL;
 +}
@@ -11461,8 +11615,8 @@ diff -urN /usr/share/empty/fs/aufs/finfo.c linux/fs/aufs/finfo.c
 +}
 diff -urN /usr/share/empty/fs/aufs/f_op.c linux/fs/aufs/f_op.c
 --- /usr/share/empty/fs/aufs/f_op.c    1970-01-01 01:00:00.000000000 +0100
-+++ linux/fs/aufs/f_op.c       2013-08-23 23:59:39.634916914 +0200
-@@ -0,0 +1,721 @@
++++ linux/fs/aufs/f_op.c       2013-10-26 16:51:32.273040419 +0200
+@@ -0,0 +1,726 @@
 +/*
 + * Copyright (C) 2005-2013 Junjiro R. Okajima
 + *
@@ -11510,13 +11664,18 @@ diff -urN /usr/share/empty/fs/aufs/f_op.c linux/fs/aufs/f_op.c
 +      memset(&finfo->fi_htop, 0, sizeof(finfo->fi_htop));
 +      atomic_set(&finfo->fi_mmapped, 0);
 +      bindex = au_dbstart(dentry);
-+      h_file = au_h_open(dentry, bindex, flags, file);
++      h_file = au_h_open(dentry, bindex, flags, file, /*force_wr*/0);
 +      if (IS_ERR(h_file))
 +              err = PTR_ERR(h_file);
 +      else {
 +              au_set_fbstart(file, bindex);
 +              au_set_h_fptr(file, bindex, h_file);
 +              au_update_figen(file);
++              if (!(file->f_mode & FMODE_WRITE)) {
++                      lg_local_lock(&files_lglock);
++                      __file_sb_list_add(file, dentry->d_sb);
++                      lg_local_unlock(&files_lglock);
++              }
 +              /* todo: necessary? */
 +              /* file->f_ra = h_file->f_ra; */
 +      }
@@ -11903,7 +12062,7 @@ diff -urN /usr/share/empty/fs/aufs/f_op.c linux/fs/aufs/f_op.c
 + * It means that when aufs acquires si_rwsem for write, the process should never
 + * acquire mmap_sem.
 + *
-+ * Actually aufs_readdir() holds [fdi]i_rwsem before mmap_sem, but this is not a
++ * Actually aufs_iterate() holds [fdi]i_rwsem before mmap_sem, but this is not a
 + * problem either since any directory is not able to be mmap-ed.
 + * The similar scenario is applied to aufs_readlink() too.
 + */
@@ -12186,7 +12345,7 @@ diff -urN /usr/share/empty/fs/aufs/f_op.c linux/fs/aufs/f_op.c
 +};
 diff -urN /usr/share/empty/fs/aufs/f_op_sp.c linux/fs/aufs/f_op_sp.c
 --- /usr/share/empty/fs/aufs/f_op_sp.c 1970-01-01 01:00:00.000000000 +0100
-+++ linux/fs/aufs/f_op_sp.c    2013-08-23 23:59:39.634916914 +0200
++++ linux/fs/aufs/f_op_sp.c    2013-10-26 16:51:32.273040419 +0200
 @@ -0,0 +1,383 @@
 +/*
 + * Copyright (C) 2005-2013 Junjiro R. Okajima
@@ -12573,7 +12732,7 @@ diff -urN /usr/share/empty/fs/aufs/f_op_sp.c linux/fs/aufs/f_op_sp.c
 +}
 diff -urN /usr/share/empty/fs/aufs/fstype.h linux/fs/aufs/fstype.h
 --- /usr/share/empty/fs/aufs/fstype.h  1970-01-01 01:00:00.000000000 +0100
-+++ linux/fs/aufs/fstype.h     2013-08-23 23:59:39.634916914 +0200
++++ linux/fs/aufs/fstype.h     2013-10-26 16:51:32.273040419 +0200
 @@ -0,0 +1,470 @@
 +/*
 + * Copyright (C) 2005-2013 Junjiro R. Okajima
@@ -13047,7 +13206,7 @@ diff -urN /usr/share/empty/fs/aufs/fstype.h linux/fs/aufs/fstype.h
 +#endif /* __AUFS_FSTYPE_H__ */
 diff -urN /usr/share/empty/fs/aufs/hfsnotify.c linux/fs/aufs/hfsnotify.c
 --- /usr/share/empty/fs/aufs/hfsnotify.c       1970-01-01 01:00:00.000000000 +0100
-+++ linux/fs/aufs/hfsnotify.c  2013-07-06 13:20:47.750198454 +0200
++++ linux/fs/aufs/hfsnotify.c  2013-10-26 16:51:32.273040419 +0200
 @@ -0,0 +1,296 @@
 +/*
 + * Copyright (C) 2005-2013 Junjiro R. Okajima
@@ -13231,7 +13390,7 @@ diff -urN /usr/share/empty/fs/aufs/hfsnotify.c linux/fs/aufs/hfsnotify.c
 +      h_dir = event->to_tell;
 +      h_inode = event->inode;
 +#ifdef AuDbgHnotify
-+      au_debug(1);
++      au_debug_on();
 +      if (1 || h_child_qstr.len != sizeof(AUFS_XINO_FNAME) - 1
 +          || strncmp(h_child_qstr.name, AUFS_XINO_FNAME, h_child_qstr.len)) {
 +              AuDbg("i%lu, mask 0x%x %s, hcname %.*s, hi%lu\n",
@@ -13239,7 +13398,7 @@ diff -urN /usr/share/empty/fs/aufs/hfsnotify.c linux/fs/aufs/hfsnotify.c
 +                    AuLNPair(&h_child_qstr), h_inode ? h_inode->i_ino : 0);
 +              /* WARN_ON(1); */
 +      }
-+      au_debug(0);
++      au_debug_off();
 +#endif
 +
 +      AuDebugOn(!inode_mark);
@@ -13347,8 +13506,8 @@ diff -urN /usr/share/empty/fs/aufs/hfsnotify.c linux/fs/aufs/hfsnotify.c
 +};
 diff -urN /usr/share/empty/fs/aufs/hfsplus.c linux/fs/aufs/hfsplus.c
 --- /usr/share/empty/fs/aufs/hfsplus.c 1970-01-01 01:00:00.000000000 +0100
-+++ linux/fs/aufs/hfsplus.c    2013-07-06 13:20:47.750198454 +0200
-@@ -0,0 +1,56 @@
++++ linux/fs/aufs/hfsplus.c    2013-10-26 16:51:32.273040419 +0200
+@@ -0,0 +1,57 @@
 +/*
 + * Copyright (C) 2010-2013 Junjiro R. Okajima
 + *
@@ -13379,7 +13538,8 @@ diff -urN /usr/share/empty/fs/aufs/hfsplus.c linux/fs/aufs/hfsplus.c
 +
 +#include "aufs.h"
 +
-+struct file *au_h_open_pre(struct dentry *dentry, aufs_bindex_t bindex)
++struct file *au_h_open_pre(struct dentry *dentry, aufs_bindex_t bindex,
++                         int force_wr)
 +{
 +      struct file *h_file;
 +      struct dentry *h_dentry;
@@ -13393,7 +13553,7 @@ diff -urN /usr/share/empty/fs/aufs/hfsplus.c linux/fs/aufs/hfsplus.c
 +          && S_ISREG(h_dentry->d_inode->i_mode))
 +              h_file = au_h_open(dentry, bindex,
 +                                 O_RDONLY | O_NOATIME | O_LARGEFILE,
-+                                 /*file*/NULL);
++                                 /*file*/NULL, force_wr);
 +      return h_file;
 +}
 +
@@ -13407,7 +13567,7 @@ diff -urN /usr/share/empty/fs/aufs/hfsplus.c linux/fs/aufs/hfsplus.c
 +}
 diff -urN /usr/share/empty/fs/aufs/hnotify.c linux/fs/aufs/hnotify.c
 --- /usr/share/empty/fs/aufs/hnotify.c 1970-01-01 01:00:00.000000000 +0100
-+++ linux/fs/aufs/hnotify.c    2013-07-30 22:42:55.842946719 +0200
++++ linux/fs/aufs/hnotify.c    2013-10-26 16:51:29.582964925 +0200
 @@ -0,0 +1,712 @@
 +/*
 + * Copyright (C) 2005-2013 Junjiro R. Okajima
@@ -13799,7 +13959,7 @@ diff -urN /usr/share/empty/fs/aufs/hnotify.c linux/fs/aufs/hnotify.c
 +                      au_digen_dec(d);
 +              else
 +                      goto cont_unlock;
-+              if (d->d_count) {
++              if (d_count(d)) {
 +                      dentry = dget_dlock(d);
 +                      spin_unlock(&d->d_lock);
 +                      break;
@@ -15503,7 +15663,7 @@ diff -urN /usr/share/empty/fs/aufs/inode.h linux/fs/aufs/inode.h
 +#endif /* __AUFS_INODE_H__ */
 diff -urN /usr/share/empty/fs/aufs/ioctl.c linux/fs/aufs/ioctl.c
 --- /usr/share/empty/fs/aufs/ioctl.c   1970-01-01 01:00:00.000000000 +0100
-+++ linux/fs/aufs/ioctl.c      2013-08-23 23:59:39.634916914 +0200
++++ linux/fs/aufs/ioctl.c      2013-10-26 16:51:32.276373845 +0200
 @@ -0,0 +1,202 @@
 +/*
 + * Copyright (C) 2005-2013 Junjiro R. Okajima
@@ -15603,7 +15763,8 @@ diff -urN /usr/share/empty/fs/aufs/ioctl.c linux/fs/aufs/ioctl.c
 +      }
 +      AuDbg("wbi %d\n", wbi);
 +      if (wbi >= 0)
-+              h_file = au_h_open(root, wbi, wbrfd.oflags, NULL);
++              h_file = au_h_open(root, wbi, wbrfd.oflags, NULL,
++                                 /*force_wr*/0);
 +
 +out_unlock:
 +      aufs_read_unlock(root, AuLock_IR);
@@ -15659,7 +15820,6 @@ diff -urN /usr/share/empty/fs/aufs/ioctl.c linux/fs/aufs/ioctl.c
 +
 +      switch (cmd) {
 +      case AUFS_CTL_MVDOWN:
-+              WARN_ONCE(1, "move-down is still testing...\n");
 +              err = au_mvdown(file->f_dentry, (void __user *)arg);
 +              break;
 +
@@ -15709,7 +15869,7 @@ diff -urN /usr/share/empty/fs/aufs/ioctl.c linux/fs/aufs/ioctl.c
 +#endif
 diff -urN /usr/share/empty/fs/aufs/i_op_add.c linux/fs/aufs/i_op_add.c
 --- /usr/share/empty/fs/aufs/i_op_add.c        1970-01-01 01:00:00.000000000 +0100
-+++ linux/fs/aufs/i_op_add.c   2013-08-23 23:59:39.634916914 +0200
++++ linux/fs/aufs/i_op_add.c   2013-10-26 16:51:32.273040419 +0200
 @@ -0,0 +1,739 @@
 +/*
 + * Copyright (C) 2005-2013 Junjiro R. Okajima
@@ -16138,7 +16298,7 @@ diff -urN /usr/share/empty/fs/aufs/i_op_add.c linux/fs/aufs/i_op_add.c
 +              dget(a->h_path.dentry);
 +              au_set_h_dptr(dentry, a->bdst, NULL);
 +              dentry->d_inode = src_dentry->d_inode; /* tmp */
-+              h_file = au_h_open_pre(dentry, a->bsrc);
++              h_file = au_h_open_pre(dentry, a->bsrc, /*force_wr*/0);
 +              if (IS_ERR(h_file))
 +                      err = PTR_ERR(h_file);
 +              else {
@@ -16452,8 +16612,8 @@ diff -urN /usr/share/empty/fs/aufs/i_op_add.c linux/fs/aufs/i_op_add.c
 +}
 diff -urN /usr/share/empty/fs/aufs/i_op.c linux/fs/aufs/i_op.c
 --- /usr/share/empty/fs/aufs/i_op.c    1970-01-01 01:00:00.000000000 +0100
-+++ linux/fs/aufs/i_op.c       2013-08-23 23:59:39.634916914 +0200
-@@ -0,0 +1,1115 @@
++++ linux/fs/aufs/i_op.c       2013-10-26 16:51:32.273040419 +0200
+@@ -0,0 +1,1118 @@
 +/*
 + * Copyright (C) 2005-2013 Junjiro R. Okajima
 + *
@@ -16758,6 +16918,7 @@ diff -urN /usr/share/empty/fs/aufs/i_op.c linux/fs/aufs/i_op.c
 +            struct au_wr_dir_args *args)
 +{
 +      int err;
++      unsigned int flags;
 +      aufs_bindex_t bcpup, bstart, src_bstart;
 +      const unsigned char add_entry
 +              = au_ftest_wrdir(args->flags, ADD_ENTRY)
@@ -16777,8 +16938,10 @@ diff -urN /usr/share/empty/fs/aufs/i_op.c linux/fs/aufs/i_op.c
 +                      if (src_bstart < bstart)
 +                              bcpup = src_bstart;
 +              } else if (add_entry) {
-+                      err = AuWbrCreate(sbinfo, dentry,
-+                                        au_ftest_wrdir(args->flags, ISDIR));
++                      flags = 0;
++                      if (au_ftest_wrdir(args->flags, ISDIR))
++                              au_fset_wbr(flags, DIR);
++                      err = AuWbrCreate(sbinfo, dentry, flags);
 +                      bcpup = err;
 +              }
 +
@@ -17571,7 +17734,7 @@ diff -urN /usr/share/empty/fs/aufs/i_op.c linux/fs/aufs/i_op.c
 +};
 diff -urN /usr/share/empty/fs/aufs/i_op_del.c linux/fs/aufs/i_op_del.c
 --- /usr/share/empty/fs/aufs/i_op_del.c        1970-01-01 01:00:00.000000000 +0100
-+++ linux/fs/aufs/i_op_del.c   2013-08-23 23:59:39.634916914 +0200
++++ linux/fs/aufs/i_op_del.c   2013-10-26 16:51:32.276373845 +0200
 @@ -0,0 +1,502 @@
 +/*
 + * Copyright (C) 2005-2013 Junjiro R. Okajima
@@ -18077,7 +18240,7 @@ diff -urN /usr/share/empty/fs/aufs/i_op_del.c linux/fs/aufs/i_op_del.c
 +}
 diff -urN /usr/share/empty/fs/aufs/i_op_ren.c linux/fs/aufs/i_op_ren.c
 --- /usr/share/empty/fs/aufs/i_op_ren.c        1970-01-01 01:00:00.000000000 +0100
-+++ linux/fs/aufs/i_op_ren.c   2013-08-23 23:59:39.634916914 +0200
++++ linux/fs/aufs/i_op_ren.c   2013-10-26 16:51:32.276373845 +0200
 @@ -0,0 +1,1009 @@
 +/*
 + * Copyright (C) 2005-2013 Junjiro R. Okajima
@@ -19296,8 +19459,8 @@ diff -urN /usr/share/empty/fs/aufs/Kconfig linux/fs/aufs/Kconfig
 +endif
 diff -urN /usr/share/empty/fs/aufs/loop.c linux/fs/aufs/loop.c
 --- /usr/share/empty/fs/aufs/loop.c    1970-01-01 01:00:00.000000000 +0100
-+++ linux/fs/aufs/loop.c       2013-07-30 22:42:55.842946719 +0200
-@@ -0,0 +1,135 @@
++++ linux/fs/aufs/loop.c       2013-10-26 16:51:32.276373845 +0200
+@@ -0,0 +1,146 @@
 +/*
 + * Copyright (C) 2005-2013 Junjiro R. Okajima
 + *
@@ -19320,23 +19483,33 @@ diff -urN /usr/share/empty/fs/aufs/loop.c linux/fs/aufs/loop.c
 + * support for loopback block device as a branch
 + */
 +
-+#include <linux/loop.h>
 +#include "aufs.h"
 +
++/* added into drivers/block/loop.c */
++static struct file *(*backing_file_func)(struct super_block *sb);
++
 +/*
 + * test if two lower dentries have overlapping branches.
 + */
 +int au_test_loopback_overlap(struct super_block *sb, struct dentry *h_adding)
 +{
 +      struct super_block *h_sb;
-+      struct loop_device *l;
++      struct file *backing_file;
++
++      if (unlikely(!backing_file_func)) {
++              /* don't load "loop" module here */
++              backing_file_func = symbol_get(loop_backing_file);
++              if (unlikely(!backing_file_func))
++                      /* "loop" module is not loaded */
++                      return 0;
++      }
 +
 +      h_sb = h_adding->d_sb;
-+      if (MAJOR(h_sb->s_dev) != LOOP_MAJOR)
++      backing_file = backing_file_func(h_sb);
++      if (!backing_file)
 +              return 0;
 +
-+      l = h_sb->s_bdev->bd_disk->private_data;
-+      h_adding = l->lo_backing_file->f_dentry;
++      h_adding = backing_file->f_dentry;
 +      /*
 +       * h_adding can be local NFS.
 +       * in this case aufs cannot detect the loop.
@@ -19431,12 +19604,13 @@ diff -urN /usr/share/empty/fs/aufs/loop.c linux/fs/aufs/loop.c
 +
 +void au_loopback_fin(void)
 +{
++      symbol_put(loop_backing_file);
 +      kfree(au_warn_loopback_array);
 +}
 diff -urN /usr/share/empty/fs/aufs/loop.h linux/fs/aufs/loop.h
 --- /usr/share/empty/fs/aufs/loop.h    1970-01-01 01:00:00.000000000 +0100
-+++ linux/fs/aufs/loop.h       2013-07-30 22:42:55.842946719 +0200
-@@ -0,0 +1,50 @@
++++ linux/fs/aufs/loop.h       2013-10-26 16:51:29.586298347 +0200
+@@ -0,0 +1,53 @@
 +/*
 + * Copyright (C) 2005-2013 Junjiro R. Okajima
 + *
@@ -19468,6 +19642,9 @@ diff -urN /usr/share/empty/fs/aufs/loop.h linux/fs/aufs/loop.h
 +struct super_block;
 +
 +#ifdef CONFIG_AUFS_BDEV_LOOP
++/* drivers/block/loop.c */
++struct file *loop_backing_file(struct super_block *sb);
++
 +/* loop.c */
 +int au_test_loopback_overlap(struct super_block *sb, struct dentry *h_adding);
 +int au_test_loopback_kthread(void);
@@ -19547,7 +19724,7 @@ diff -urN /usr/share/empty/fs/aufs/magic.mk linux/fs/aufs/magic.mk
 +endif
 diff -urN /usr/share/empty/fs/aufs/Makefile linux/fs/aufs/Makefile
 --- /usr/share/empty/fs/aufs/Makefile  1970-01-01 01:00:00.000000000 +0100
-+++ linux/fs/aufs/Makefile     2013-08-23 23:59:39.631583456 +0200
++++ linux/fs/aufs/Makefile     2013-10-26 16:51:32.273040419 +0200
 @@ -0,0 +1,42 @@
 +
 +include ${src}/magic.mk
@@ -19909,8 +20086,8 @@ diff -urN /usr/share/empty/fs/aufs/module.h linux/fs/aufs/module.h
 +#endif /* __AUFS_MODULE_H__ */
 diff -urN /usr/share/empty/fs/aufs/mvdown.c linux/fs/aufs/mvdown.c
 --- /usr/share/empty/fs/aufs/mvdown.c  1970-01-01 01:00:00.000000000 +0100
-+++ linux/fs/aufs/mvdown.c     2013-08-23 23:59:39.634916914 +0200
-@@ -0,0 +1,533 @@
++++ linux/fs/aufs/mvdown.c     2013-10-26 16:51:32.276373845 +0200
+@@ -0,0 +1,610 @@
 +/*
 + * Copyright (C) 2011-2013 Junjiro R. Okajima
 + *
@@ -19931,19 +20108,12 @@ diff -urN /usr/share/empty/fs/aufs/mvdown.c linux/fs/aufs/mvdown.c
 +
 +#include "aufs.h"
 +
-+enum {
-+      AUFS_MVDOWN_SRC,
-+      AUFS_MVDOWN_DST,
-+      AUFS_MVDOWN_NARRAY
-+};
-+
 +struct au_mvd_args {
 +      struct {
-+              aufs_bindex_t bindex;
 +              struct super_block *h_sb;
 +              struct dentry *h_parent;
 +              struct au_hinode *hdir;
-+              struct inode *h_dir;
++              struct inode *h_dir, *h_inode;
 +      } info[AUFS_MVDOWN_NARRAY];
 +
 +      struct aufs_mvdown mvdown;
@@ -19955,17 +20125,23 @@ diff -urN /usr/share/empty/fs/aufs/mvdown.c linux/fs/aufs/mvdown.c
 +      struct au_pin pin;
 +};
 +
-+#define mvd_bsrc              info[AUFS_MVDOWN_SRC].bindex
-+#define mvd_h_src_sb          info[AUFS_MVDOWN_SRC].h_sb
-+#define mvd_h_src_parent      info[AUFS_MVDOWN_SRC].h_parent
-+#define mvd_hdir_src          info[AUFS_MVDOWN_SRC].hdir
-+#define mvd_h_src_dir         info[AUFS_MVDOWN_SRC].h_dir
++#define mvd_errno             mvdown.au_errno
++#define mvd_bsrc              mvdown.a[AUFS_MVDOWN_UPPER].bindex
++#define mvd_src_brid          mvdown.a[AUFS_MVDOWN_UPPER].brid
++#define mvd_bdst              mvdown.a[AUFS_MVDOWN_LOWER].bindex
++#define mvd_dst_brid          mvdown.a[AUFS_MVDOWN_LOWER].brid
 +
-+#define mvd_bdst              info[AUFS_MVDOWN_DST].bindex
-+#define mvd_h_dst_sb          info[AUFS_MVDOWN_DST].h_sb
-+#define mvd_h_dst_parent      info[AUFS_MVDOWN_DST].h_parent
-+#define mvd_hdir_dst          info[AUFS_MVDOWN_DST].hdir
-+#define mvd_h_dst_dir         info[AUFS_MVDOWN_DST].h_dir
++#define mvd_h_src_sb          info[AUFS_MVDOWN_UPPER].h_sb
++#define mvd_h_src_parent      info[AUFS_MVDOWN_UPPER].h_parent
++#define mvd_hdir_src          info[AUFS_MVDOWN_UPPER].hdir
++#define mvd_h_src_dir         info[AUFS_MVDOWN_UPPER].h_dir
++#define mvd_h_src_inode               info[AUFS_MVDOWN_UPPER].h_inode
++
++#define mvd_h_dst_sb          info[AUFS_MVDOWN_LOWER].h_sb
++#define mvd_h_dst_parent      info[AUFS_MVDOWN_LOWER].h_parent
++#define mvd_hdir_dst          info[AUFS_MVDOWN_LOWER].hdir
++#define mvd_h_dst_dir         info[AUFS_MVDOWN_LOWER].h_dir
++#define mvd_h_dst_inode               info[AUFS_MVDOWN_LOWER].h_inode
 +
 +#define AU_MVD_PR(flag, ...) do {                     \
 +              if (flag)                               \
@@ -19973,7 +20149,7 @@ diff -urN /usr/share/empty/fs/aufs/mvdown.c linux/fs/aufs/mvdown.c
 +      } while (0)
 +
 +/* make the parent dir on bdst */
-+static int au_do_mkdir(const unsigned char verbose, struct au_mvd_args *a)
++static int au_do_mkdir(const unsigned char dmsg, struct au_mvd_args *a)
 +{
 +      int err;
 +
@@ -19987,7 +20163,7 @@ diff -urN /usr/share/empty/fs/aufs/mvdown.c linux/fs/aufs/mvdown.c
 +      if (!a->mvd_h_dst_parent) {
 +              err = au_cpdown_dirs(a->dentry, a->mvd_bdst);
 +              if (unlikely(err)) {
-+                      AU_MVD_PR(verbose, "cpdown_dirs failed\n");
++                      AU_MVD_PR(dmsg, "cpdown_dirs failed\n");
 +                      goto out;
 +              }
 +              a->mvd_h_dst_parent = au_h_dptr(a->parent, a->mvd_bdst);
@@ -19999,7 +20175,7 @@ diff -urN /usr/share/empty/fs/aufs/mvdown.c linux/fs/aufs/mvdown.c
 +}
 +
 +/* lock them all */
-+static int au_do_lock(const unsigned char verbose, struct au_mvd_args *a)
++static int au_do_lock(const unsigned char dmsg, struct au_mvd_args *a)
 +{
 +      int err;
 +      struct dentry *h_trap;
@@ -20008,14 +20184,15 @@ diff -urN /usr/share/empty/fs/aufs/mvdown.c linux/fs/aufs/mvdown.c
 +      a->mvd_h_dst_sb = au_sbr_sb(a->sb, a->mvd_bdst);
 +      if (a->mvd_h_src_sb != a->mvd_h_dst_sb) {
 +              a->rename_lock = 0;
-+              err = au_pin(&a->pin, a->dentry, a->mvd_bdst, au_opt_udba(a->sb),
++              err = au_pin(&a->pin, a->dentry, a->mvd_bdst,
++                           au_opt_udba(a->sb),
 +                           AuPin_MNT_WRITE | AuPin_DI_LOCKED);
 +              if (!err) {
 +                      a->mvd_h_src_dir = a->mvd_h_src_parent->d_inode;
 +                      mutex_lock_nested(&a->mvd_h_src_dir->i_mutex,
 +                                        AuLsc_I_PARENT3);
 +              } else
-+                      AU_MVD_PR(verbose, "pin failed\n");
++                      AU_MVD_PR(dmsg, "pin failed\n");
 +              goto out;
 +      }
 +
@@ -20035,7 +20212,7 @@ diff -urN /usr/share/empty/fs/aufs/mvdown.c linux/fs/aufs/mvdown.c
 +      return err;
 +}
 +
-+static void au_do_unlock(const unsigned char verbose, struct au_mvd_args *a)
++static void au_do_unlock(const unsigned char dmsg, struct au_mvd_args *a)
 +{
 +      if (!a->rename_lock) {
 +              mutex_unlock(&a->mvd_h_src_dir->i_mutex);
@@ -20046,7 +20223,7 @@ diff -urN /usr/share/empty/fs/aufs/mvdown.c linux/fs/aufs/mvdown.c
 +}
 +
 +/* copy-down the file */
-+static int au_do_cpdown(const unsigned char verbose, struct au_mvd_args *a)
++static int au_do_cpdown(const unsigned char dmsg, struct au_mvd_args *a)
 +{
 +      int err;
 +      struct au_cp_generic cpg = {
@@ -20059,9 +20236,13 @@ diff -urN /usr/share/empty/fs/aufs/mvdown.c linux/fs/aufs/mvdown.c
 +      };
 +
 +      AuDbg("b%d, b%d\n", cpg.bsrc, cpg.bdst);
++      if (a->mvdown.flags & AUFS_MVDOWN_OWLOWER)
++              au_fset_cpup(cpg.flags, OVERWRITE);
++      if (a->mvdown.flags & AUFS_MVDOWN_ROLOWER)
++              au_fset_cpup(cpg.flags, RWDST);
 +      err = au_sio_cpdown_simple(&cpg);
 +      if (unlikely(err))
-+              AU_MVD_PR(verbose, "cpdown failed\n");
++              AU_MVD_PR(dmsg, "cpdown failed\n");
 +
 +      AuTraceErr(err);
 +      return err;
@@ -20071,7 +20252,7 @@ diff -urN /usr/share/empty/fs/aufs/mvdown.c linux/fs/aufs/mvdown.c
 + * unlink the whiteout on bdst if exist which may be created by UDBA while we
 + * were sleeping
 + */
-+static int au_do_unlink_wh(const unsigned char verbose, struct au_mvd_args *a)
++static int au_do_unlink_wh(const unsigned char dmsg, struct au_mvd_args *a)
 +{
 +      int err;
 +      struct path h_path;
@@ -20081,7 +20262,7 @@ diff -urN /usr/share/empty/fs/aufs/mvdown.c linux/fs/aufs/mvdown.c
 +      h_path.dentry = au_wh_lkup(a->mvd_h_dst_parent, &a->dentry->d_name, br);
 +      err = PTR_ERR(h_path.dentry);
 +      if (IS_ERR(h_path.dentry)) {
-+              AU_MVD_PR(verbose, "wh_lkup failed\n");
++              AU_MVD_PR(dmsg, "wh_lkup failed\n");
 +              goto out;
 +      }
 +
@@ -20091,7 +20272,7 @@ diff -urN /usr/share/empty/fs/aufs/mvdown.c linux/fs/aufs/mvdown.c
 +              err = vfsub_unlink(a->mvd_h_dst_parent->d_inode, &h_path,
 +                                 /*force*/0);
 +              if (unlikely(err))
-+                      AU_MVD_PR(verbose, "wh_unlink failed\n");
++                      AU_MVD_PR(dmsg, "wh_unlink failed\n");
 +      }
 +      dput(h_path.dentry);
 +
@@ -20105,7 +20286,7 @@ diff -urN /usr/share/empty/fs/aufs/mvdown.c linux/fs/aufs/mvdown.c
 + * Note: the target file MAY be modified by UDBA between this mutex_unlock() and
 + *    mutex_lock() in vfs_unlink(). in this case, such changes may be lost.
 + */
-+static int au_do_unlink(const unsigned char verbose, struct au_mvd_args *a)
++static int au_do_unlink(const unsigned char dmsg, struct au_mvd_args *a)
 +{
 +      int err;
 +      struct path h_path;
@@ -20114,7 +20295,7 @@ diff -urN /usr/share/empty/fs/aufs/mvdown.c linux/fs/aufs/mvdown.c
 +      h_path.dentry = au_h_dptr(a->dentry, a->mvd_bsrc);
 +      err = vfsub_unlink(a->mvd_h_src_dir, &h_path, /*force*/0);
 +      if (unlikely(err))
-+              AU_MVD_PR(verbose, "unlink failed\n");
++              AU_MVD_PR(dmsg, "unlink failed\n");
 +
 +      AuTraceErr(err);
 +      return err;
@@ -20126,13 +20307,13 @@ diff -urN /usr/share/empty/fs/aufs/mvdown.c linux/fs/aufs/mvdown.c
 + * - copy-down the file (with whtmp name and rename)
 + * - unlink the bsrc file
 + */
-+static int au_do_mvdown(const unsigned char verbose, struct au_mvd_args *a)
++static int au_do_mvdown(const unsigned char dmsg, struct au_mvd_args *a)
 +{
 +      int err;
 +
-+      err = au_do_mkdir(verbose, a);
++      err = au_do_mkdir(dmsg, a);
 +      if (!err)
-+              err = au_do_lock(verbose, a);
++              err = au_do_lock(dmsg, a);
 +      if (unlikely(err))
 +              goto out;
 +
@@ -20141,26 +20322,28 @@ diff -urN /usr/share/empty/fs/aufs/mvdown.c linux/fs/aufs/mvdown.c
 +       * harmless in aufs.
 +       */
 +
-+      err = au_do_cpdown(verbose, a);
-+      if (!err)
-+              err = au_do_unlink_wh(verbose, a);
++      err = au_do_cpdown(dmsg, a);
 +      if (!err)
-+              err = au_do_unlink(verbose, a);
++              err = au_do_unlink_wh(dmsg, a);
++      if (!err && !(a->mvdown.flags & AUFS_MVDOWN_KUPPER))
++              err = au_do_unlink(dmsg, a);
 +      if (unlikely(err))
 +              goto out_unlock;
 +
 +      /* maintain internal array */
-+      au_set_h_dptr(a->dentry, a->mvd_bsrc, NULL);
-+      au_set_dbstart(a->dentry, a->mvd_bdst);
++      if (!(a->mvdown.flags & AUFS_MVDOWN_KUPPER)) {
++              au_set_h_dptr(a->dentry, a->mvd_bsrc, NULL);
++              au_set_dbstart(a->dentry, a->mvd_bdst);
++              au_set_h_iptr(a->inode, a->mvd_bsrc, NULL, /*flags*/0);
++              au_set_ibstart(a->inode, a->mvd_bdst);
++      }
 +      if (au_dbend(a->dentry) < a->mvd_bdst)
 +              au_set_dbend(a->dentry, a->mvd_bdst);
-+      au_set_h_iptr(a->inode, a->mvd_bsrc, NULL, /*flags*/0);
-+      au_set_ibstart(a->inode, a->mvd_bdst);
 +      if (au_ibend(a->inode) < a->mvd_bdst)
 +              au_set_ibend(a->inode, a->mvd_bdst);
 +
 +out_unlock:
-+      au_do_unlock(verbose, a);
++      au_do_unlock(dmsg, a);
 +out:
 +      AuTraceErr(err);
 +      return err;
@@ -20168,44 +20351,57 @@ diff -urN /usr/share/empty/fs/aufs/mvdown.c linux/fs/aufs/mvdown.c
 +
 +/* ---------------------------------------------------------------------- */
 +
-+static int find_lower_writable(struct super_block *sb, aufs_bindex_t bindex)
++static int find_lower_writable(struct au_mvd_args *a)
 +{
-+      aufs_bindex_t bend;
++      struct super_block *sb;
++      aufs_bindex_t bindex, bend;
 +      struct au_branch *br;
 +
++      sb = a->sb;
++      bindex = a->mvd_bsrc;
 +      bend = au_sbend(sb);
-+      for (bindex++; bindex <= bend; bindex++) {
-+              br = au_sbr(sb, bindex);
-+              if (!au_br_rdonly(br))
-+                      return bindex;
++      if (!(a->mvdown.flags & AUFS_MVDOWN_ROLOWER)) {
++              for (bindex++; bindex <= bend; bindex++) {
++                      br = au_sbr(sb, bindex);
++                      if (!au_br_rdonly(br))
++                              return bindex;
++              }
++      } else {
++              for (bindex++; bindex <= bend; bindex++) {
++                      br = au_sbr(sb, bindex);
++                      if (!(au_br_sb(br)->s_flags & MS_RDONLY)) {
++                              if (au_br_rdonly(br))
++                                      a->mvdown.flags
++                                              |= AUFS_MVDOWN_ROLOWER_R;
++                              return bindex;
++                      }
++              }
 +      }
 +
 +      return -1;
 +}
 +
 +/* make sure the file is idle */
-+static int au_mvd_args_busy(const unsigned char verbose, struct au_mvd_args *a)
++static int au_mvd_args_busy(const unsigned char dmsg, struct au_mvd_args *a)
 +{
 +      int err, plinked;
-+      struct inode *h_src_inode;
 +
 +      err = 0;
-+      h_src_inode = au_h_iptr(a->inode, a->mvd_bsrc);
 +      plinked = !!au_opt_test(au_mntflags(a->sb), PLINK);
 +      if (au_dbstart(a->dentry) == a->mvd_bsrc
-+          && a->dentry->d_count == 1
++          && d_count(a->dentry) == 1
 +          && atomic_read(&a->inode->i_count) == 1
-+          /* && h_src_inode->i_nlink == 1 */
++          /* && a->mvd_h_src_inode->i_nlink == 1 */
 +          && (!plinked || !au_plink_test(a->inode))
 +          && a->inode->i_nlink == 1)
 +              goto out;
 +
 +      err = -EBUSY;
-+      AU_MVD_PR(verbose,
++      AU_MVD_PR(dmsg,
 +                "b%d, d{b%d, c%u?}, i{c%d?, l%u}, hi{l%u}, p{%d, %d}\n",
-+                a->mvd_bsrc, au_dbstart(a->dentry), a->dentry->d_count,
++                a->mvd_bsrc, au_dbstart(a->dentry), d_count(a->dentry),
 +                atomic_read(&a->inode->i_count), a->inode->i_nlink,
-+                h_src_inode->i_nlink,
++                a->mvd_h_src_inode->i_nlink,
 +                plinked, plinked ? au_plink_test(a->inode) : 0);
 +
 +out:
@@ -20214,7 +20410,7 @@ diff -urN /usr/share/empty/fs/aufs/mvdown.c linux/fs/aufs/mvdown.c
 +}
 +
 +/* make sure the parent dir is fine */
-+static int au_mvd_args_parent(const unsigned char verbose,
++static int au_mvd_args_parent(const unsigned char dmsg,
 +                            struct au_mvd_args *a)
 +{
 +      int err;
@@ -20223,7 +20419,7 @@ diff -urN /usr/share/empty/fs/aufs/mvdown.c linux/fs/aufs/mvdown.c
 +      err = 0;
 +      if (unlikely(au_alive_dir(a->parent))) {
 +              err = -ENOENT;
-+              AU_MVD_PR(verbose, "parent dir is dead\n");
++              AU_MVD_PR(dmsg, "parent dir is dead\n");
 +              goto out;
 +      }
 +
@@ -20233,7 +20429,8 @@ diff -urN /usr/share/empty/fs/aufs/mvdown.c linux/fs/aufs/mvdown.c
 +      if (unlikely((bindex >= 0 && bindex < a->mvd_bdst)
 +                   || (a->bopq != -1 && a->bopq < a->mvd_bdst))) {
 +              err = -EINVAL;
-+              AU_MVD_PR(verbose, "parent dir is opaque b%d, b%d\n",
++              a->mvd_errno = EAU_MVDOWN_OPAQUE;
++              AU_MVD_PR(dmsg, "ancestor is opaque b%d, b%d\n",
 +                        a->bopq, a->mvd_bdst);
 +      }
 +
@@ -20242,7 +20439,7 @@ diff -urN /usr/share/empty/fs/aufs/mvdown.c linux/fs/aufs/mvdown.c
 +      return err;
 +}
 +
-+static int au_mvd_args_intermediate(const unsigned char verbose,
++static int au_mvd_args_intermediate(const unsigned char dmsg,
 +                                  struct au_mvd_args *a)
 +{
 +      int err;
@@ -20271,7 +20468,7 @@ diff -urN /usr/share/empty/fs/aufs/mvdown.c linux/fs/aufs/mvdown.c
 +      au_rw_write_unlock(&tmp->di_rwsem);
 +      au_di_free(tmp);
 +      if (unlikely(err < 0))
-+              AU_MVD_PR(verbose, "failed look-up lower\n");
++              AU_MVD_PR(dmsg, "failed look-up lower\n");
 +
 +      /*
 +       * here, we have these cases.
@@ -20311,11 +20508,13 @@ diff -urN /usr/share/empty/fs/aufs/mvdown.c linux/fs/aufs/mvdown.c
 +          && a->mvd_bsrc < a->bwh
 +          && a->bwh != -1
 +          && a->bwh < a->mvd_bdst) {
-+              AU_MVD_PR(verbose, "bsrc %d, bdst %d, bfound %d, bwh %d\n",
++              a->mvd_errno = EAU_MVDOWN_WHITEOUT;
++              AU_MVD_PR(dmsg, "bsrc %d, bdst %d, bfound %d, bwh %d\n",
 +                        a->mvd_bsrc, a->mvd_bdst, a->bfound, a->bwh);
 +              goto out;
 +      } else if (a->bfound != -1 && a->bfound < a->mvd_bdst) {
-+              AU_MVD_PR(verbose, "bdst %d, bfound %d\n",
++              a->mvd_errno = EAU_MVDOWN_UPPER;
++              AU_MVD_PR(dmsg, "bdst %d, bfound %d\n",
 +                        a->mvd_bdst, a->bfound);
 +              goto out;
 +      }
@@ -20327,16 +20526,19 @@ diff -urN /usr/share/empty/fs/aufs/mvdown.c linux/fs/aufs/mvdown.c
 +      return err;
 +}
 +
-+static int au_mvd_args_exist(const unsigned char verbose, struct au_mvd_args *a)
++static int au_mvd_args_exist(const unsigned char dmsg, struct au_mvd_args *a)
 +{
 +      int err;
 +
-+      err = (a->bfound != a->mvd_bdst) ? 0 : -EEXIST;
++      err = 0;
++      if (!(a->mvdown.flags & AUFS_MVDOWN_OWLOWER)
++          && a->bfound == a->mvd_bdst)
++              err = -EEXIST;
 +      AuTraceErr(err);
 +      return err;
 +}
 +
-+static int au_mvd_args(const unsigned char verbose, struct au_mvd_args *a)
++static int au_mvd_args(const unsigned char dmsg, struct au_mvd_args *a)
 +{
 +      int err;
 +      struct au_branch *br;
@@ -20346,30 +20548,66 @@ diff -urN /usr/share/empty/fs/aufs/mvdown.c linux/fs/aufs/mvdown.c
 +              goto out;
 +
 +      err = -EINVAL;
-+      a->mvd_bsrc = au_ibstart(a->inode);
++      if (!(a->mvdown.flags & AUFS_MVDOWN_BRID_UPPER))
++              a->mvd_bsrc = au_ibstart(a->inode);
++      else {
++              a->mvd_bsrc = au_br_index(a->sb, a->mvd_src_brid);
++              if (unlikely(a->mvd_bsrc < 0
++                           || (a->mvd_bsrc < au_dbstart(a->dentry)
++                               || au_dbend(a->dentry) < a->mvd_bsrc
++                               || !au_h_dptr(a->dentry, a->mvd_bsrc))
++                           || (a->mvd_bsrc < au_ibstart(a->inode)
++                               || au_ibend(a->inode) < a->mvd_bsrc
++                               || !au_h_iptr(a->inode, a->mvd_bsrc)))) {
++                      a->mvd_errno = EAU_MVDOWN_NOUPPER;
++                      AU_MVD_PR(dmsg, "no upper\n");
++                      goto out;
++              }
++      }
 +      if (unlikely(a->mvd_bsrc == au_sbend(a->sb))) {
-+              AU_MVD_PR(verbose, "on the bottom\n");
++              a->mvd_errno = EAU_MVDOWN_BOTTOM;
++              AU_MVD_PR(dmsg, "on the bottom\n");
 +              goto out;
 +      }
++      a->mvd_h_src_inode = au_h_iptr(a->inode, a->mvd_bsrc);
 +      br = au_sbr(a->sb, a->mvd_bsrc);
 +      err = au_br_rdonly(br);
-+      if (unlikely(err))
++      if (!(a->mvdown.flags & AUFS_MVDOWN_ROUPPER)) {
++              if (unlikely(err))
++                      goto out;
++      } else if (!(vfsub_native_ro(a->mvd_h_src_inode)
++                   || IS_APPEND(a->mvd_h_src_inode))) {
++              if (err)
++                      a->mvdown.flags |= AUFS_MVDOWN_ROUPPER_R;
++              /* go on */
++      } else
 +              goto out;
 +
 +      err = -EINVAL;
-+      a->mvd_bdst = find_lower_writable(a->sb, a->mvd_bsrc);
-+      if (unlikely(a->mvd_bdst < 0)) {
-+              AU_MVD_PR(verbose, "no writable lower branch\n");
-+              goto out;
++      if (!(a->mvdown.flags & AUFS_MVDOWN_BRID_LOWER)) {
++              a->mvd_bdst = find_lower_writable(a);
++              if (unlikely(a->mvd_bdst < 0)) {
++                      a->mvd_errno = EAU_MVDOWN_BOTTOM;
++                      AU_MVD_PR(dmsg, "no writable lower branch\n");
++                      goto out;
++              }
++      } else {
++              a->mvd_bdst = au_br_index(a->sb, a->mvd_dst_brid);
++              if (unlikely(a->mvd_bdst < 0
++                           || au_sbend(a->sb) < a->mvd_bdst)) {
++                      a->mvd_errno = EAU_MVDOWN_NOLOWERBR;
++                      AU_MVD_PR(dmsg, "no lower brid\n");
++                      goto out;
++              }
 +      }
 +
-+      err = au_mvd_args_busy(verbose, a);
++      err = au_mvd_args_busy(dmsg, a);
 +      if (!err)
-+              err = au_mvd_args_parent(verbose, a);
++              err = au_mvd_args_parent(dmsg, a);
 +      if (!err)
-+              err = au_mvd_args_intermediate(verbose, a);
++              err = au_mvd_args_intermediate(dmsg, a);
 +      if (!err)
-+              err = au_mvd_args_exist(verbose, a);
++              err = au_mvd_args_exist(dmsg, a);
 +      if (!err)
 +              AuDbg("b%d, b%d\n", a->mvd_bsrc, a->mvd_bdst);
 +
@@ -20380,74 +20618,90 @@ diff -urN /usr/share/empty/fs/aufs/mvdown.c linux/fs/aufs/mvdown.c
 +
 +int au_mvdown(struct dentry *dentry, struct aufs_mvdown __user *uarg)
 +{
-+      int err;
-+      unsigned char verbose;
-+      struct au_mvd_args args = {
-+              .dentry = dentry,
-+              .inode  = dentry->d_inode,
-+              .sb     = dentry->d_sb
-+      };
++      int err, e;
++      unsigned char dmsg;
++      struct au_mvd_args *args;
 +
 +      err = -EPERM;
 +      if (unlikely(!capable(CAP_SYS_ADMIN)))
 +              goto out;
 +
-+      err = copy_from_user(&args.mvdown, uarg, sizeof(args.mvdown));
++      WARN_ONCE(1, "move-down is still testing...\n");
++
++      err = -ENOMEM;
++      args = kmalloc(sizeof(*args), GFP_NOFS);
++      if (unlikely(!args))
++              goto out;
++
++      err = copy_from_user(&args->mvdown, uarg, sizeof(args->mvdown));
++      if (!err)
++              err = !access_ok(VERIFY_WRITE, uarg, sizeof(*uarg));
 +      if (unlikely(err)) {
 +              err = -EFAULT;
-+              goto out;
++              AuTraceErr(err);
++              goto out_free;
 +      }
-+      AuDbg("flags 0x%x\n", args.mvdown.flags);
++      AuDbg("flags 0x%x\n", args->mvdown.flags);
++      args->mvdown.flags &= ~(AUFS_MVDOWN_ROLOWER_R | AUFS_MVDOWN_ROUPPER_R);
++      args->mvdown.au_errno = 0;
++      args->dentry = dentry;
++      args->inode = dentry->d_inode;
++      args->sb = dentry->d_sb;
 +
-+      err = -EBUSY;
-+      verbose = !!(args.mvdown.flags & AUFS_MVDOWN_VERBOSE);
-+      args.parent = dget_parent(dentry);
-+      args.dir = args.parent->d_inode;
-+      mutex_lock_nested(&args.dir->i_mutex, I_MUTEX_PARENT);
-+      dput(args.parent);
-+      if (unlikely(args.parent != dentry->d_parent)) {
-+              AU_MVD_PR(verbose, "parent dir is moved\n");
++      err = -ENOENT;
++      dmsg = !!(args->mvdown.flags & AUFS_MVDOWN_DMSG);
++      args->parent = dget_parent(dentry);
++      args->dir = args->parent->d_inode;
++      mutex_lock_nested(&args->dir->i_mutex, I_MUTEX_PARENT);
++      dput(args->parent);
++      if (unlikely(args->parent != dentry->d_parent)) {
++              AU_MVD_PR(dmsg, "parent dir is moved\n");
 +              goto out_dir;
 +      }
 +
-+      mutex_lock_nested(&args.inode->i_mutex, I_MUTEX_CHILD);
++      mutex_lock_nested(&args->inode->i_mutex, I_MUTEX_CHILD);
 +      err = aufs_read_lock(dentry, AuLock_DW | AuLock_FLUSH);
 +      if (unlikely(err))
 +              goto out_inode;
 +
-+      di_write_lock_parent(args.parent);
-+      err = au_mvd_args(verbose, &args);
++      di_write_lock_parent(args->parent);
++      err = au_mvd_args(dmsg, args);
 +      if (unlikely(err))
 +              goto out_parent;
 +
 +      AuDbgDentry(dentry);
-+      AuDbgInode(args.inode);
-+      err = au_do_mvdown(verbose, &args);
++      AuDbgInode(args->inode);
++      err = au_do_mvdown(dmsg, args);
 +      if (unlikely(err))
 +              goto out_parent;
 +      AuDbgDentry(dentry);
-+      AuDbgInode(args.inode);
++      AuDbgInode(args->inode);
 +
-+      au_cpup_attr_timesizes(args.dir);
-+      au_cpup_attr_timesizes(args.inode);
-+      au_cpup_igen(args.inode, au_h_iptr(args.inode, args.mvd_bdst));
++      au_cpup_attr_timesizes(args->dir);
++      au_cpup_attr_timesizes(args->inode);
++      au_cpup_igen(args->inode, au_h_iptr(args->inode, args->mvd_bdst));
 +      /* au_digen_dec(dentry); */
 +
 +out_parent:
-+      di_write_unlock(args.parent);
++      di_write_unlock(args->parent);
 +      aufs_read_unlock(dentry, AuLock_DW);
 +out_inode:
-+      mutex_unlock(&args.inode->i_mutex);
++      mutex_unlock(&args->inode->i_mutex);
 +out_dir:
-+      mutex_unlock(&args.dir->i_mutex);
++      mutex_unlock(&args->dir->i_mutex);
++out_free:
++      e = copy_to_user(uarg, &args->mvdown, sizeof(args->mvdown));
++      if (unlikely(e))
++              err = -EFAULT;
++      kfree(args);
 +out:
 +      AuTraceErr(err);
 +      return err;
 +}
 diff -urN /usr/share/empty/fs/aufs/opts.c linux/fs/aufs/opts.c
 --- /usr/share/empty/fs/aufs/opts.c    1970-01-01 01:00:00.000000000 +0100
-+++ linux/fs/aufs/opts.c       2013-07-06 13:20:47.753531903 +0200
-@@ -0,0 +1,1697 @@
++++ linux/fs/aufs/opts.c       2013-10-26 16:51:32.276373845 +0200
+@@ -0,0 +1,1704 @@
 +/*
 + * Copyright (C) 2005-2013 Junjiro R. Okajima
 + *
@@ -20814,6 +21068,8 @@ diff -urN /usr/share/empty/fs/aufs/opts.c linux/fs/aufs/opts.c
 +      {AuWbrCreate_MFSRRV, "mfsrr:%d:%d"},
 +      {AuWbrCreate_PMFS, "pmfs"},
 +      {AuWbrCreate_PMFSV, "pmfs:%d"},
++      {AuWbrCreate_PMFSRR, "pmfsrr:%d"},
++      {AuWbrCreate_PMFSRRV, "pmfsrr:%d:%d"},
 +
 +      {-1, NULL}
 +};
@@ -20883,6 +21139,7 @@ diff -urN /usr/share/empty/fs/aufs/opts.c linux/fs/aufs/opts.c
 +      create->wbr_create = err;
 +      switch (err) {
 +      case AuWbrCreate_MFSRRV:
++      case AuWbrCreate_PMFSRRV:
 +              e = au_wbr_mfs_wmark(&args[0], str, create);
 +              if (!e)
 +                      e = au_wbr_mfs_sec(&args[1], str, create);
@@ -20890,6 +21147,7 @@ diff -urN /usr/share/empty/fs/aufs/opts.c linux/fs/aufs/opts.c
 +                      err = e;
 +              break;
 +      case AuWbrCreate_MFSRR:
++      case AuWbrCreate_PMFSRR:
 +              e = au_wbr_mfs_wmark(&args[0], str, create);
 +              if (unlikely(e)) {
 +                      err = e;
@@ -21106,6 +21364,7 @@ diff -urN /usr/share/empty/fs/aufs/opts.c linux/fs/aufs/opts.c
 +                                        u.create->mfsrr_watermark);
 +                              break;
 +                      case AuWbrCreate_MFSRRV:
++                      case AuWbrCreate_PMFSRRV:
 +                              AuDbg("%llu watermark, %d sec\n",
 +                                        u.create->mfsrr_watermark,
 +                                        u.create->mfs_second);
@@ -21645,6 +21904,8 @@ diff -urN /usr/share/empty/fs/aufs/opts.c linux/fs/aufs/opts.c
 +      switch (create->wbr_create) {
 +      case AuWbrCreate_MFSRRV:
 +      case AuWbrCreate_MFSRR:
++      case AuWbrCreate_PMFSRR:
++      case AuWbrCreate_PMFSRRV:
 +              sbinfo->si_wbr_mfs.mfsrr_watermark = create->mfsrr_watermark;
 +              /*FALLTHROUGH*/
 +      case AuWbrCreate_MFS:
@@ -22147,8 +22408,8 @@ diff -urN /usr/share/empty/fs/aufs/opts.c linux/fs/aufs/opts.c
 +}
 diff -urN /usr/share/empty/fs/aufs/opts.h linux/fs/aufs/opts.h
 --- /usr/share/empty/fs/aufs/opts.h    1970-01-01 01:00:00.000000000 +0100
-+++ linux/fs/aufs/opts.h       2013-07-06 13:20:47.753531903 +0200
-@@ -0,0 +1,209 @@
++++ linux/fs/aufs/opts.h       2013-10-26 16:51:32.276373845 +0200
+@@ -0,0 +1,211 @@
 +/*
 + * Copyright (C) 2005-2013 Junjiro R. Okajima
 + *
@@ -22253,6 +22514,8 @@ diff -urN /usr/share/empty/fs/aufs/opts.h linux/fs/aufs/opts.h
 +      AuWbrCreate_MFSRRV,     /* mfs then rr with seconds */
 +      AuWbrCreate_PMFS,       /* parent and mfs */
 +      AuWbrCreate_PMFSV,      /* parent and mfs with seconds */
++      AuWbrCreate_PMFSRR,     /* parent, mfs and round-robin */
++      AuWbrCreate_PMFSRRV,    /* plus seconds */
 +
 +      AuWbrCreate_Def = AuWbrCreate_TDP
 +};
@@ -23118,8 +23381,8 @@ diff -urN /usr/share/empty/fs/aufs/procfs.c linux/fs/aufs/procfs.c
 +}
 diff -urN /usr/share/empty/fs/aufs/rdu.c linux/fs/aufs/rdu.c
 --- /usr/share/empty/fs/aufs/rdu.c     1970-01-01 01:00:00.000000000 +0100
-+++ linux/fs/aufs/rdu.c        2013-07-30 22:42:55.842946719 +0200
-@@ -0,0 +1,384 @@
++++ linux/fs/aufs/rdu.c        2013-10-26 16:51:29.586298347 +0200
+@@ -0,0 +1,389 @@
 +/*
 + * Copyright (C) 2005-2013 Junjiro R. Okajima
 + *
@@ -23158,6 +23421,7 @@ diff -urN /usr/share/empty/fs/aufs/rdu.c linux/fs/aufs/rdu.c
 +      do { (flags) &= ~AuRdu_##name; } while (0)
 +
 +struct au_rdu_arg {
++      struct dir_context              ctx;
 +      struct aufs_rdu                 *rdu;
 +      union au_rdu_ent_ul             ent;
 +      unsigned long                   end;
@@ -23166,11 +23430,11 @@ diff -urN /usr/share/empty/fs/aufs/rdu.c linux/fs/aufs/rdu.c
 +      int                             err;
 +};
 +
-+static int au_rdu_fill(void *__arg, const char *name, int nlen,
++static int au_rdu_fill(struct dir_context *ctx, const char *name, int nlen,
 +                     loff_t offset, u64 h_ino, unsigned int d_type)
 +{
 +      int err, len;
-+      struct au_rdu_arg *arg = __arg;
++      struct au_rdu_arg *arg = container_of(ctx, struct au_rdu_arg, ctx);
 +      struct aufs_rdu *rdu = arg->rdu;
 +      struct au_rdu_ent ent;
 +
@@ -23228,7 +23492,7 @@ diff -urN /usr/share/empty/fs/aufs/rdu.c linux/fs/aufs/rdu.c
 +              arg->err = 0;
 +              au_fclr_rdu(cookie->flags, CALLED);
 +              /* smp_mb(); */
-+              err = vfsub_readdir(h_file, au_rdu_fill, arg);
++              err = vfsub_iterate_dir(h_file, &arg->ctx);
 +              if (err >= 0)
 +                      err = arg->err;
 +      } while (!err
@@ -23245,7 +23509,11 @@ diff -urN /usr/share/empty/fs/aufs/rdu.c linux/fs/aufs/rdu.c
 +{
 +      int err;
 +      aufs_bindex_t bend;
-+      struct au_rdu_arg arg;
++      struct au_rdu_arg arg = {
++              .ctx = {
++                      .actor = au_diractor(au_rdu_fill)
++              }
++      };
 +      struct dentry *dentry;
 +      struct inode *inode;
 +      struct file *h_file;
@@ -23266,7 +23534,7 @@ diff -urN /usr/share/empty/fs/aufs/rdu.c linux/fs/aufs/rdu.c
 +      arg.end += rdu->sz;
 +
 +      err = -ENOTDIR;
-+      if (unlikely(!file->f_op || !file->f_op->readdir))
++      if (unlikely(!file->f_op || !file->f_op->iterate))
 +              goto out;
 +
 +      err = security_file_permission(file, MAY_READ);
@@ -23698,8 +23966,8 @@ diff -urN /usr/share/empty/fs/aufs/rwsem.h linux/fs/aufs/rwsem.h
 +#endif /* __AUFS_RWSEM_H__ */
 diff -urN /usr/share/empty/fs/aufs/sbinfo.c linux/fs/aufs/sbinfo.c
 --- /usr/share/empty/fs/aufs/sbinfo.c  1970-01-01 01:00:00.000000000 +0100
-+++ linux/fs/aufs/sbinfo.c     2013-07-06 13:20:47.753531903 +0200
-@@ -0,0 +1,346 @@
++++ linux/fs/aufs/sbinfo.c     2013-10-26 16:51:32.276373845 +0200
+@@ -0,0 +1,350 @@
 +/*
 + * Copyright (C) 2005-2013 Junjiro R. Okajima
 + *
@@ -23793,6 +24061,7 @@ diff -urN /usr/share/empty/fs/aufs/sbinfo.c linux/fs/aufs/sbinfo.c
 +      atomic_long_set(&sbinfo->si_nfiles, 0);
 +
 +      sbinfo->si_bend = -1;
++      sbinfo->si_last_br_id = AUFS_BRANCH_MAX / 2;
 +
 +      sbinfo->si_wbr_copyup = AuWbrCopyup_Def;
 +      sbinfo->si_wbr_create = AuWbrCreate_Def;
@@ -23801,6 +24070,9 @@ diff -urN /usr/share/empty/fs/aufs/sbinfo.c linux/fs/aufs/sbinfo.c
 +
 +      sbinfo->si_mntflags = au_opts_plink(AuOpt_Def);
 +
++      sbinfo->si_xino_jiffy = jiffies;
++      sbinfo->si_xino_expire
++              = msecs_to_jiffies(AUFS_XINO_DEF_SEC * MSEC_PER_SEC);
 +      mutex_init(&sbinfo->si_xib_mtx);
 +      sbinfo->si_xino_brid = -1;
 +      /* leave si_xib_last_pindex and si_xib_next_bit */
@@ -24164,8 +24436,8 @@ diff -urN /usr/share/empty/fs/aufs/spl.h linux/fs/aufs/spl.h
 +#endif /* __AUFS_SPL_H__ */
 diff -urN /usr/share/empty/fs/aufs/super.c linux/fs/aufs/super.c
 --- /usr/share/empty/fs/aufs/super.c   1970-01-01 01:00:00.000000000 +0100
-+++ linux/fs/aufs/super.c      2013-08-23 23:59:39.634916914 +0200
-@@ -0,0 +1,992 @@
++++ linux/fs/aufs/super.c      2013-10-26 16:51:32.276373845 +0200
+@@ -0,0 +1,1002 @@
 +/*
 + * Copyright (C) 2005-2013 Junjiro R. Okajima
 + *
@@ -24328,6 +24600,16 @@ diff -urN /usr/share/empty/fs/aufs/super.c linux/fs/aufs/super.c
 +                         jiffies_to_msecs(sbinfo->si_wbr_mfs.mfs_expire)
 +                         / MSEC_PER_SEC);
 +              break;
++      case AuWbrCreate_PMFSRR:
++              seq_printf(m, /*pat*/"pmfsrr:%llu",
++                         sbinfo->si_wbr_mfs.mfsrr_watermark);
++              break;
++      case AuWbrCreate_PMFSRRV:
++              seq_printf(m, /*pat*/"pmfsrr:%llu:%lu",
++                         sbinfo->si_wbr_mfs.mfsrr_watermark,
++                         jiffies_to_msecs(sbinfo->si_wbr_mfs.mfs_expire)
++                         / MSEC_PER_SEC);
++              break;
 +      }
 +}
 +
@@ -25160,8 +25442,8 @@ diff -urN /usr/share/empty/fs/aufs/super.c linux/fs/aufs/super.c
 +};
 diff -urN /usr/share/empty/fs/aufs/super.h linux/fs/aufs/super.h
 --- /usr/share/empty/fs/aufs/super.h   1970-01-01 01:00:00.000000000 +0100
-+++ linux/fs/aufs/super.h      2013-08-23 23:59:39.638250372 +0200
-@@ -0,0 +1,559 @@
++++ linux/fs/aufs/super.h      2013-10-26 16:51:32.276373845 +0200
+@@ -0,0 +1,568 @@
 +/*
 + * Copyright (C) 2005-2013 Junjiro R. Okajima
 + *
@@ -25203,8 +25485,15 @@ diff -urN /usr/share/empty/fs/aufs/super.h linux/fs/aufs/super.h
 +      int (*copyup)(struct dentry *dentry);
 +};
 +
++#define AuWbr_DIR     1               /* target is a dir */
++#define AuWbr_PARENT  (1 << 1)        /* always require a parent */
++
++#define au_ftest_wbr(flags, name)     ((flags) & AuWbr_##name)
++#define au_fset_wbr(flags, name)      { (flags) |= AuWbr_##name; }
++#define au_fclr_wbr(flags, name)      { (flags) &= ~AuWbr_##name; }
++
 +struct au_wbr_create_operations {
-+      int (*create)(struct dentry *dentry, int isdir);
++      int (*create)(struct dentry *dentry, unsigned int flags);
 +      int (*init)(struct super_block *sb);
 +      int (*fin)(struct super_block *sb);
 +};
@@ -25294,6 +25583,8 @@ diff -urN /usr/share/empty/fs/aufs/super.h linux/fs/aufs/super.h
 +      unsigned long           si_xib_last_pindex;
 +      int                     si_xib_next_bit;
 +      aufs_bindex_t           si_xino_brid;
++      unsigned long           si_xino_jiffy;
++      unsigned long           si_xino_expire;
 +      /* reserved for future use */
 +      /* unsigned long long   si_xib_limit; */        /* Max xib file size */
 +
@@ -25940,8 +26231,8 @@ diff -urN /usr/share/empty/fs/aufs/sysaufs.h linux/fs/aufs/sysaufs.h
 +#endif /* __SYSAUFS_H__ */
 diff -urN /usr/share/empty/fs/aufs/sysfs.c linux/fs/aufs/sysfs.c
 --- /usr/share/empty/fs/aufs/sysfs.c   1970-01-01 01:00:00.000000000 +0100
-+++ linux/fs/aufs/sysfs.c      2013-07-06 13:20:47.753531903 +0200
-@@ -0,0 +1,257 @@
++++ linux/fs/aufs/sysfs.c      2013-10-26 16:51:32.276373845 +0200
+@@ -0,0 +1,297 @@
 +/*
 + * Copyright (C) 2005-2013 Junjiro R. Okajima
 + *
@@ -26022,7 +26313,7 @@ diff -urN /usr/share/empty/fs/aufs/sysfs.c linux/fs/aufs/sysfs.c
 + * unlinked.
 + */
 +static int sysaufs_si_br(struct seq_file *seq, struct super_block *sb,
-+                       aufs_bindex_t bindex)
++                       aufs_bindex_t bindex, int idx)
 +{
 +      int err;
 +      struct path path;
@@ -26036,18 +26327,30 @@ diff -urN /usr/share/empty/fs/aufs/sysfs.c linux/fs/aufs/sysfs.c
 +      root = sb->s_root;
 +      di_read_lock_parent(root, !AuLock_IR);
 +      br = au_sbr(sb, bindex);
-+      path.mnt = au_br_mnt(br);
-+      path.dentry = au_h_dptr(root, bindex);
-+      au_seq_path(seq, &path);
-+      di_read_unlock(root, !AuLock_IR);
-+      perm = au_optstr_br_perm(br->br_perm);
-+      if (perm) {
-+              err = seq_printf(seq, "=%s\n", perm);
-+              kfree(perm);
++
++      switch (idx) {
++      case AuBrSysfs_BR:
++              path.mnt = au_br_mnt(br);
++              path.dentry = au_h_dptr(root, bindex);
++              au_seq_path(seq, &path);
++              di_read_unlock(root, !AuLock_IR);
++              perm = au_optstr_br_perm(br->br_perm);
++              if (perm) {
++                      err = seq_printf(seq, "=%s\n", perm);
++                      kfree(perm);
++                      if (err == -1)
++                              err = -E2BIG;
++              } else
++                      err = -ENOMEM;
++              break;
++      case AuBrSysfs_BRID:
++              err = seq_printf(seq, "%d\n", br->br_id);
++              di_read_unlock(root, !AuLock_IR);
 +              if (err == -1)
 +                      err = -E2BIG;
-+      } else
-+              err = -ENOMEM;
++              break;
++      }
++
 +      return err;
 +}
 +
@@ -26069,13 +26372,15 @@ diff -urN /usr/share/empty/fs/aufs/sysfs.c linux/fs/aufs/sysfs.c
 +      return seq;
 +}
 +
-+#define SysaufsBr_PREFIX "br"
++#define SysaufsBr_PREFIX      "br"
++#define SysaufsBrid_PREFIX    "brid"
 +
 +/* todo: file size may exceed PAGE_SIZE */
 +ssize_t sysaufs_si_show(struct kobject *kobj, struct attribute *attr,
 +                      char *buf)
 +{
 +      ssize_t err;
++      int idx;
 +      long l;
 +      aufs_bindex_t bend;
 +      struct au_sbinfo *sbinfo;
@@ -26117,19 +26422,25 @@ diff -urN /usr/share/empty/fs/aufs/sysfs.c linux/fs/aufs/sysfs.c
 +              cattr++;
 +      }
 +
-+      bend = au_sbend(sb);
-+      if (!strncmp(name, SysaufsBr_PREFIX, sizeof(SysaufsBr_PREFIX) - 1)) {
++      if (!strncmp(name, SysaufsBrid_PREFIX,
++                   sizeof(SysaufsBrid_PREFIX) - 1)) {
++              idx = AuBrSysfs_BRID;
++              name += sizeof(SysaufsBrid_PREFIX) - 1;
++      } else if (!strncmp(name, SysaufsBr_PREFIX,
++                          sizeof(SysaufsBr_PREFIX) - 1)) {
++              idx = AuBrSysfs_BR;
 +              name += sizeof(SysaufsBr_PREFIX) - 1;
-+              err = kstrtol(name, 10, &l);
-+              if (!err) {
-+                      if (l <= bend)
-+                              err = sysaufs_si_br(seq, sb, (aufs_bindex_t)l);
-+                      else
-+                              err = -ENOENT;
-+              }
-+              goto out_seq;
++      } else
++                BUG();
++
++      err = kstrtol(name, 10, &l);
++      if (!err) {
++              bend = au_sbend(sb);
++              if (l <= bend)
++                      err = sysaufs_si_br(seq, sb, (aufs_bindex_t)l, idx);
++              else
++                      err = -ENOENT;
 +      }
-+      BUG();
 +
 +out_seq:
 +      if (!err) {
@@ -26149,17 +26460,26 @@ diff -urN /usr/share/empty/fs/aufs/sysfs.c linux/fs/aufs/sysfs.c
 +
 +void sysaufs_br_init(struct au_branch *br)
 +{
-+      struct attribute *attr = &br->br_attr;
++      int i;
++      struct au_brsysfs *br_sysfs;
++      struct attribute *attr;
 +
-+      sysfs_attr_init(attr);
-+      attr->name = br->br_name;
-+      attr->mode = S_IRUGO;
++      br_sysfs = br->br_sysfs;
++      for (i = 0; i < ARRAY_SIZE(br->br_sysfs); i++) {
++              attr = &br_sysfs->attr;
++              sysfs_attr_init(attr);
++              attr->name = br_sysfs->name;
++              attr->mode = S_IRUGO;
++              br_sysfs++;
++      }
 +}
 +
 +void sysaufs_brs_del(struct super_block *sb, aufs_bindex_t bindex)
 +{
 +      struct au_branch *br;
 +      struct kobject *kobj;
++      struct au_brsysfs *br_sysfs;
++      int i;
 +      aufs_bindex_t bend;
 +
 +      dbgaufs_brs_del(sb, bindex);
@@ -26171,16 +26491,21 @@ diff -urN /usr/share/empty/fs/aufs/sysfs.c linux/fs/aufs/sysfs.c
 +      bend = au_sbend(sb);
 +      for (; bindex <= bend; bindex++) {
 +              br = au_sbr(sb, bindex);
-+              sysfs_remove_file(kobj, &br->br_attr);
++              br_sysfs = br->br_sysfs;
++              for (i = 0; i < ARRAY_SIZE(br->br_sysfs); i++) {
++                      sysfs_remove_file(kobj, &br_sysfs->attr);
++                      br_sysfs++;
++              }
 +      }
 +}
 +
 +void sysaufs_brs_add(struct super_block *sb, aufs_bindex_t bindex)
 +{
-+      int err;
++      int err, i;
 +      aufs_bindex_t bend;
 +      struct kobject *kobj;
 +      struct au_branch *br;
++      struct au_brsysfs *br_sysfs;
 +
 +      dbgaufs_brs_add(sb, bindex);
 +
@@ -26191,12 +26516,18 @@ diff -urN /usr/share/empty/fs/aufs/sysfs.c linux/fs/aufs/sysfs.c
 +      bend = au_sbend(sb);
 +      for (; bindex <= bend; bindex++) {
 +              br = au_sbr(sb, bindex);
-+              snprintf(br->br_name, sizeof(br->br_name), SysaufsBr_PREFIX
-+                       "%d", bindex);
-+              err = sysfs_create_file(kobj, &br->br_attr);
-+              if (unlikely(err))
-+                      pr_warn("failed %s under sysfs(%d)\n",
-+                              br->br_name, err);
++              br_sysfs = br->br_sysfs;
++              snprintf(br_sysfs[AuBrSysfs_BR].name, sizeof(br_sysfs->name),
++                       SysaufsBr_PREFIX "%d", bindex);
++              snprintf(br_sysfs[AuBrSysfs_BRID].name, sizeof(br_sysfs->name),
++                       SysaufsBrid_PREFIX "%d", bindex);
++              for (i = 0; i < ARRAY_SIZE(br->br_sysfs); i++) {
++                      err = sysfs_create_file(kobj, &br_sysfs->attr);
++                      if (unlikely(err))
++                              pr_warn("failed %s under sysfs(%d)\n",
++                                      br_sysfs->name, err);
++                      br_sysfs++;
++              }
 +      }
 +}
 diff -urN /usr/share/empty/fs/aufs/sysrq.c linux/fs/aufs/sysrq.c
@@ -26356,8 +26687,8 @@ diff -urN /usr/share/empty/fs/aufs/sysrq.c linux/fs/aufs/sysrq.c
 +}
 diff -urN /usr/share/empty/fs/aufs/vdir.c linux/fs/aufs/vdir.c
 --- /usr/share/empty/fs/aufs/vdir.c    1970-01-01 01:00:00.000000000 +0100
-+++ linux/fs/aufs/vdir.c       2013-07-30 22:42:55.842946719 +0200
-@@ -0,0 +1,878 @@
++++ linux/fs/aufs/vdir.c       2013-10-26 16:51:29.586298347 +0200
+@@ -0,0 +1,888 @@
 +/*
 + * Copyright (C) 2005-2013 Junjiro R. Okajima
 + *
@@ -26797,6 +27128,7 @@ diff -urN /usr/share/empty/fs/aufs/vdir.c linux/fs/aufs/vdir.c
 +#endif
 +
 +struct fillvdir_arg {
++      struct dir_context      ctx;
 +      struct file             *file;
 +      struct au_vdir          *vdir;
 +      struct au_nhash         delist;
@@ -26806,11 +27138,11 @@ diff -urN /usr/share/empty/fs/aufs/vdir.c linux/fs/aufs/vdir.c
 +      int                     err;
 +};
 +
-+static int fillvdir(void *__arg, const char *__name, int nlen,
++static int fillvdir(struct dir_context *ctx, const char *__name, int nlen,
 +                  loff_t offset __maybe_unused, u64 h_ino,
 +                  unsigned int d_type)
 +{
-+      struct fillvdir_arg *arg = __arg;
++      struct fillvdir_arg *arg = container_of(ctx, struct fillvdir_arg, ctx);
 +      char *name = (void *)__name;
 +      struct super_block *sb;
 +      ino_t ino;
@@ -26958,10 +27290,15 @@ diff -urN /usr/share/empty/fs/aufs/vdir.c linux/fs/aufs/vdir.c
 +                      arg->err = 0;
 +                      au_fclr_fillvdir(arg->flags, CALLED);
 +                      /* smp_mb(); */
-+                      err = vfsub_readdir(hf, fillvdir, arg);
++                      err = vfsub_iterate_dir(hf, &arg->ctx);
 +                      if (err >= 0)
 +                              err = arg->err;
 +              } while (!err && au_ftest_fillvdir(arg->flags, CALLED));
++
++              /*
++               * dir_relax() may be good for concurrency, but aufs should not
++               * use it since it will cause a lockdep problem.
++               */
 +      }
 +
 +      if (!err && shwh)
@@ -26980,7 +27317,11 @@ diff -urN /usr/share/empty/fs/aufs/vdir.c linux/fs/aufs/vdir.c
 +      int err;
 +      unsigned long expire;
 +      unsigned char do_read;
-+      struct fillvdir_arg arg;
++      struct fillvdir_arg arg = {
++              .ctx = {
++                      .actor = au_diractor(fillvdir)
++              }
++      };
 +      struct inode *inode;
 +      struct au_vdir *vdir, *allocated;
 +
@@ -27017,7 +27358,7 @@ diff -urN /usr/share/empty/fs/aufs/vdir.c linux/fs/aufs/vdir.c
 +      arg.vdir = vdir;
 +      err = au_do_read_vdir(&arg);
 +      if (!err) {
-+              /* file->f_pos = 0; */
++              /* file->f_pos = 0; */ /* todo: ctx->pos? */
 +              vdir->vd_version = inode->i_version;
 +              vdir->vd_last.ul = 0;
 +              vdir->vd_last.p.deblk = vdir->vd_deblk[0];
@@ -27090,6 +27431,7 @@ diff -urN /usr/share/empty/fs/aufs/vdir.c linux/fs/aufs/vdir.c
 +      struct inode *inode;
 +      struct au_vdir *vdir_cache, *allocated;
 +
++      /* test file->f_pos here instead of ctx->pos */
 +      err = read_vdir(file, !file->f_pos);
 +      if (unlikely(err))
 +              goto out;
@@ -27103,6 +27445,7 @@ diff -urN /usr/share/empty/fs/aufs/vdir.c linux/fs/aufs/vdir.c
 +                      goto out;
 +              allocated = vdir_cache;
 +      } else if (!file->f_pos && vdir_cache->vd_version != file->f_version) {
++              /* test file->f_pos here instead of ctx->pos */
 +              err = reinit_vdir(vdir_cache);
 +              if (unlikely(err))
 +                      goto out;
@@ -27134,7 +27477,7 @@ diff -urN /usr/share/empty/fs/aufs/vdir.c linux/fs/aufs/vdir.c
 +}
 +
 +/* returns true or false */
-+static int seek_vdir(struct file *file)
++static int seek_vdir(struct file *file, struct dir_context *ctx)
 +{
 +      int valid;
 +      unsigned int deblk_sz;
@@ -27147,17 +27490,17 @@ diff -urN /usr/share/empty/fs/aufs/vdir.c linux/fs/aufs/vdir.c
 +      vdir_cache = au_fvdir_cache(file);
 +      offset = calc_offset(vdir_cache);
 +      AuDbg("offset %lld\n", offset);
-+      if (file->f_pos == offset)
++      if (ctx->pos == offset)
 +              goto out;
 +
 +      vdir_cache->vd_last.ul = 0;
 +      vdir_cache->vd_last.p.deblk = vdir_cache->vd_deblk[0];
-+      if (!file->f_pos)
++      if (!ctx->pos)
 +              goto out;
 +
 +      valid = 0;
 +      deblk_sz = vdir_cache->vd_deblk_sz;
-+      ul = div64_u64(file->f_pos, deblk_sz);
++      ul = div64_u64(ctx->pos, deblk_sz);
 +      AuDbg("ul %lu\n", ul);
 +      if (ul >= vdir_cache->vd_nblk)
 +              goto out;
@@ -27168,7 +27511,7 @@ diff -urN /usr/share/empty/fs/aufs/vdir.c linux/fs/aufs/vdir.c
 +              deblk_end.deblk = p.deblk + deblk_sz;
 +              offset = ul;
 +              offset *= deblk_sz;
-+              while (!is_deblk_end(&p, &deblk_end) && offset < file->f_pos) {
++              while (!is_deblk_end(&p, &deblk_end) && offset < ctx->pos) {
 +                      unsigned int l;
 +
 +                      l = calc_size(p.de->de_str.len);
@@ -27189,16 +27532,15 @@ diff -urN /usr/share/empty/fs/aufs/vdir.c linux/fs/aufs/vdir.c
 +      return valid;
 +}
 +
-+int au_vdir_fill_de(struct file *file, void *dirent, filldir_t filldir)
++int au_vdir_fill_de(struct file *file, struct dir_context *ctx)
 +{
-+      int err;
 +      unsigned int l, deblk_sz;
 +      union au_vdir_deblk_p deblk_end;
 +      struct au_vdir *vdir_cache;
 +      struct au_vdir_de *de;
 +
 +      vdir_cache = au_fvdir_cache(file);
-+      if (!seek_vdir(file))
++      if (!seek_vdir(file, ctx))
 +              return 0;
 +
 +      deblk_sz = vdir_cache->vd_deblk_sz;
@@ -27208,12 +27550,11 @@ diff -urN /usr/share/empty/fs/aufs/vdir.c linux/fs/aufs/vdir.c
 +              while (!is_deblk_end(&vdir_cache->vd_last.p, &deblk_end)) {
 +                      de = vdir_cache->vd_last.p.de;
 +                      AuDbg("%.*s, off%lld, i%lu, dt%d\n",
-+                            de->de_str.len, de->de_str.name, file->f_pos,
++                            de->de_str.len, de->de_str.name, ctx->pos,
 +                            (unsigned long)de->de_ino, de->de_type);
-+                      err = filldir(dirent, de->de_str.name, de->de_str.len,
-+                                    file->f_pos, de->de_ino, de->de_type);
-+                      if (unlikely(err)) {
-+                              AuTraceErr(err);
++                      if (unlikely(!dir_emit(ctx, de->de_str.name,
++                                             de->de_str.len, de->de_ino,
++                                             de->de_type))) {
 +                              /* todo: ignore the error caused by udba? */
 +                              /* return err; */
 +                              return 0;
@@ -27221,13 +27562,13 @@ diff -urN /usr/share/empty/fs/aufs/vdir.c linux/fs/aufs/vdir.c
 +
 +                      l = calc_size(de->de_str.len);
 +                      vdir_cache->vd_last.p.deblk += l;
-+                      file->f_pos += l;
++                      ctx->pos += l;
 +              }
 +              if (vdir_cache->vd_last.ul < vdir_cache->vd_nblk - 1) {
 +                      vdir_cache->vd_last.ul++;
 +                      vdir_cache->vd_last.p.deblk
 +                              = vdir_cache->vd_deblk[vdir_cache->vd_last.ul];
-+                      file->f_pos = deblk_sz * vdir_cache->vd_last.ul;
++                      ctx->pos = deblk_sz * vdir_cache->vd_last.ul;
 +                      continue;
 +              }
 +              break;
@@ -27238,8 +27579,8 @@ diff -urN /usr/share/empty/fs/aufs/vdir.c linux/fs/aufs/vdir.c
 +}
 diff -urN /usr/share/empty/fs/aufs/vfsub.c linux/fs/aufs/vfsub.c
 --- /usr/share/empty/fs/aufs/vfsub.c   1970-01-01 01:00:00.000000000 +0100
-+++ linux/fs/aufs/vfsub.c      2013-07-30 22:42:55.842946719 +0200
-@@ -0,0 +1,769 @@
++++ linux/fs/aufs/vfsub.c      2013-10-26 16:51:29.586298347 +0200
+@@ -0,0 +1,772 @@
 +/*
 + * Copyright (C) 2005-2013 Junjiro R. Okajima
 + *
@@ -27718,12 +28059,15 @@ diff -urN /usr/share/empty/fs/aufs/vfsub.c linux/fs/aufs/vfsub.c
 +      return err;
 +}
 +
-+int vfsub_readdir(struct file *file, filldir_t filldir, void *arg)
++int vfsub_iterate_dir(struct file *file, struct dir_context *ctx)
 +{
 +      int err;
 +
++      AuDbg("%.*s, ctx{%pf, %llu}\n",
++            AuDLNPair(file->f_dentry), ctx->actor, ctx->pos);
++
 +      lockdep_off();
-+      err = vfs_readdir(file, filldir, arg);
++      err = iterate_dir(file, ctx);
 +      lockdep_on();
 +      if (err >= 0)
 +              vfsub_update_h_iattr(&file->f_path, /*did*/NULL); /*ignore*/
@@ -27949,7 +28293,7 @@ diff -urN /usr/share/empty/fs/aufs/vfsub.c linux/fs/aufs/vfsub.c
 +      struct dentry *d = a->path->dentry;
 +      struct inode *h_inode;
 +      const int stop_sillyrename = (au_test_nfs(d->d_sb)
-+                                    && d->d_count == 1);
++                                    && d_count(d) == 1);
 +
 +      IMustLock(a->dir);
 +
@@ -28011,8 +28355,8 @@ diff -urN /usr/share/empty/fs/aufs/vfsub.c linux/fs/aufs/vfsub.c
 +}
 diff -urN /usr/share/empty/fs/aufs/vfsub.h linux/fs/aufs/vfsub.h
 --- /usr/share/empty/fs/aufs/vfsub.h   1970-01-01 01:00:00.000000000 +0100
-+++ linux/fs/aufs/vfsub.h      2013-07-30 22:42:55.842946719 +0200
-@@ -0,0 +1,294 @@
++++ linux/fs/aufs/vfsub.h      2013-10-26 16:51:32.276373845 +0200
+@@ -0,0 +1,312 @@
 +/*
 + * Copyright (C) 2005-2013 Junjiro R. Okajima
 + *
@@ -28050,6 +28394,7 @@ diff -urN /usr/share/empty/fs/aufs/vfsub.h linux/fs/aufs/vfsub.h
 +extern struct lglock vfsmount_lock;
 +extern void __mnt_drop_write(struct vfsmount *);
 +extern spinlock_t inode_sb_list_lock;
++void __file_sb_list_add(struct file *file, struct super_block *sb);
 +
 +/* copied from linux/fs/file_table.c */
 +extern struct lglock files_lglock;
@@ -28116,6 +28461,14 @@ diff -urN /usr/share/empty/fs/aufs/vfsub.h linux/fs/aufs/vfsub.h
 +      clear_nlink(inode);
 +}
 +
++static inline int vfsub_native_ro(struct inode *inode)
++{
++      return (inode->i_sb->s_flags & MS_RDONLY)
++              || IS_RDONLY(inode)
++              /* || IS_APPEND(inode) */
++              || IS_IMMUTABLE(inode);
++}
++
 +/* ---------------------------------------------------------------------- */
 +
 +int vfsub_update_h_iattr(struct path *h_path, int *did);
@@ -28196,7 +28549,16 @@ diff -urN /usr/share/empty/fs/aufs/vfsub.h linux/fs/aufs/vfsub.h
 +ssize_t vfsub_write_k(struct file *file, void *kbuf, size_t count,
 +                    loff_t *ppos);
 +int vfsub_flush(struct file *file, fl_owner_t id);
-+int vfsub_readdir(struct file *file, filldir_t filldir, void *arg);
++int vfsub_iterate_dir(struct file *file, struct dir_context *ctx);
++
++/* just for type-check */
++static inline filldir_t au_diractor(int (*func)(struct dir_context *,
++                                              const char *, int, loff_t, u64,
++                                              unsigned))
++{
++      return (filldir_t)func;
++}
++
 +
 +static inline loff_t vfsub_f_size_read(struct file *file)
 +{
@@ -28309,8 +28671,8 @@ diff -urN /usr/share/empty/fs/aufs/vfsub.h linux/fs/aufs/vfsub.h
 +#endif /* __AUFS_VFSUB_H__ */
 diff -urN /usr/share/empty/fs/aufs/wbr_policy.c linux/fs/aufs/wbr_policy.c
 --- /usr/share/empty/fs/aufs/wbr_policy.c      1970-01-01 01:00:00.000000000 +0100
-+++ linux/fs/aufs/wbr_policy.c 2013-08-23 23:59:39.638250372 +0200
-@@ -0,0 +1,693 @@
++++ linux/fs/aufs/wbr_policy.c 2013-10-26 16:51:32.276373845 +0200
+@@ -0,0 +1,756 @@
 +/*
 + * Copyright (C) 2005-2013 Junjiro R. Okajima
 + *
@@ -28573,7 +28935,8 @@ diff -urN /usr/share/empty/fs/aufs/wbr_policy.c linux/fs/aufs/wbr_policy.c
 +}
 +
 +/* top down parent */
-+static int au_wbr_create_tdp(struct dentry *dentry, int isdir __maybe_unused)
++static int au_wbr_create_tdp(struct dentry *dentry,
++                           unsigned int flags __maybe_unused)
 +{
 +      int err;
 +      aufs_bindex_t bstart, bindex;
@@ -28662,7 +29025,7 @@ diff -urN /usr/share/empty/fs/aufs/wbr_policy.c linux/fs/aufs/wbr_policy.c
 +      return err;
 +}
 +
-+static int au_wbr_create_rr(struct dentry *dentry, int isdir)
++static int au_wbr_create_rr(struct dentry *dentry, unsigned int flags)
 +{
 +      int err, nbr;
 +      unsigned int u;
@@ -28679,7 +29042,7 @@ diff -urN /usr/share/empty/fs/aufs/wbr_policy.c linux/fs/aufs/wbr_policy.c
 +      bend = au_sbend(sb);
 +      nbr = bend + 1;
 +      for (bindex = 0; bindex <= bend; bindex++) {
-+              if (!isdir) {
++              if (!au_ftest_wbr(flags, DIR)) {
 +                      err = atomic_dec_return(next) + 1;
 +                      /* modulo for 0 is meaningless */
 +                      if (unlikely(!err))
@@ -28706,11 +29069,12 @@ diff -urN /usr/share/empty/fs/aufs/wbr_policy.c linux/fs/aufs/wbr_policy.c
 +/* ---------------------------------------------------------------------- */
 +
 +/* most free space */
-+static void au_mfs(struct dentry *dentry)
++static void au_mfs(struct dentry *dentry, struct dentry *parent)
 +{
 +      struct super_block *sb;
 +      struct au_branch *br;
 +      struct au_wbr_mfs *mfs;
++      struct dentry *h_parent;
 +      aufs_bindex_t bindex, bend;
 +      int err;
 +      unsigned long long b, bavail;
@@ -28730,8 +29094,20 @@ diff -urN /usr/share/empty/fs/aufs/wbr_policy.c linux/fs/aufs/wbr_policy.c
 +      MtxMustLock(&mfs->mfs_lock);
 +      mfs->mfs_bindex = -EROFS;
 +      mfs->mfsrr_bytes = 0;
-+      bend = au_sbend(sb);
-+      for (bindex = 0; bindex <= bend; bindex++) {
++      if (!parent) {
++              bindex = 0;
++              bend = au_sbend(sb);
++      } else {
++              bindex = au_dbstart(parent);
++              bend = au_dbtaildir(parent);
++      }
++
++      for (; bindex <= bend; bindex++) {
++              if (parent) {
++                      h_parent = au_h_dptr(parent, bindex);
++                      if (!h_parent || !h_parent->d_inode)
++                              continue;
++              }
 +              br = au_sbr(sb, bindex);
 +              if (au_br_rdonly(br))
 +                      continue;
@@ -28762,9 +29138,10 @@ diff -urN /usr/share/empty/fs/aufs/wbr_policy.c linux/fs/aufs/wbr_policy.c
 +      kfree(st);
 +}
 +
-+static int au_wbr_create_mfs(struct dentry *dentry, int isdir __maybe_unused)
++static int au_wbr_create_mfs(struct dentry *dentry, unsigned int flags)
 +{
 +      int err;
++      struct dentry *parent;
 +      struct super_block *sb;
 +      struct au_wbr_mfs *mfs;
 +
@@ -28773,14 +29150,18 @@ diff -urN /usr/share/empty/fs/aufs/wbr_policy.c linux/fs/aufs/wbr_policy.c
 +              goto out;
 +
 +      sb = dentry->d_sb;
++      parent = NULL;
++      if (au_ftest_wbr(flags, PARENT))
++              parent = dget_parent(dentry);
 +      mfs = &au_sbi(sb)->si_wbr_mfs;
 +      mutex_lock(&mfs->mfs_lock);
 +      if (time_after(jiffies, mfs->mfs_jiffy + mfs->mfs_expire)
 +          || mfs->mfs_bindex < 0
 +          || au_br_rdonly(au_sbr(sb, mfs->mfs_bindex)))
-+              au_mfs(dentry);
++              au_mfs(dentry, parent);
 +      mutex_unlock(&mfs->mfs_lock);
 +      err = mfs->mfs_bindex;
++      dput(parent);
 +
 +      if (err >= 0)
 +              err = au_wbr_nonopq(dentry, err);
@@ -28811,17 +29192,17 @@ diff -urN /usr/share/empty/fs/aufs/wbr_policy.c linux/fs/aufs/wbr_policy.c
 +/* ---------------------------------------------------------------------- */
 +
 +/* most free space and then round robin */
-+static int au_wbr_create_mfsrr(struct dentry *dentry, int isdir)
++static int au_wbr_create_mfsrr(struct dentry *dentry, unsigned int flags)
 +{
 +      int err;
 +      struct au_wbr_mfs *mfs;
 +
-+      err = au_wbr_create_mfs(dentry, isdir);
++      err = au_wbr_create_mfs(dentry, flags);
 +      if (err >= 0) {
 +              mfs = &au_sbi(dentry->d_sb)->si_wbr_mfs;
 +              mutex_lock(&mfs->mfs_lock);
 +              if (mfs->mfsrr_bytes < mfs->mfsrr_watermark)
-+                      err = au_wbr_create_rr(dentry, isdir);
++                      err = au_wbr_create_rr(dentry, flags);
 +              mutex_unlock(&mfs->mfs_lock);
 +      }
 +
@@ -28842,7 +29223,7 @@ diff -urN /usr/share/empty/fs/aufs/wbr_policy.c linux/fs/aufs/wbr_policy.c
 +/* ---------------------------------------------------------------------- */
 +
 +/* top down parent and most free space */
-+static int au_wbr_create_pmfs(struct dentry *dentry, int isdir)
++static int au_wbr_create_pmfs(struct dentry *dentry, unsigned int flags)
 +{
 +      int err, e2;
 +      unsigned long long b;
@@ -28851,7 +29232,7 @@ diff -urN /usr/share/empty/fs/aufs/wbr_policy.c linux/fs/aufs/wbr_policy.c
 +      struct dentry *parent, *h_parent;
 +      struct au_branch *br;
 +
-+      err = au_wbr_create_tdp(dentry, isdir);
++      err = au_wbr_create_tdp(dentry, flags);
 +      if (unlikely(err < 0))
 +              goto out;
 +      parent = dget_parent(dentry);
@@ -28860,7 +29241,7 @@ diff -urN /usr/share/empty/fs/aufs/wbr_policy.c linux/fs/aufs/wbr_policy.c
 +      if (bstart == bend)
 +              goto out_parent; /* success */
 +
-+      e2 = au_wbr_create_mfs(dentry, isdir);
++      e2 = au_wbr_create_mfs(dentry, flags);
 +      if (e2 < 0)
 +              goto out_parent; /* success */
 +
@@ -28895,12 +29276,46 @@ diff -urN /usr/share/empty/fs/aufs/wbr_policy.c linux/fs/aufs/wbr_policy.c
 +
 +/* ---------------------------------------------------------------------- */
 +
++/*
++ * - top down parent
++ * - most free space with parent
++ * - most free space round-robin regardless parent
++ */
++static int au_wbr_create_pmfsrr(struct dentry *dentry, unsigned int flags)
++{
++      int err;
++      unsigned long long watermark;
++      struct super_block *sb;
++      struct au_branch *br;
++      struct au_wbr_mfs *mfs;
++
++      err = au_wbr_create_pmfs(dentry, flags | AuWbr_PARENT);
++      if (unlikely(err < 0))
++              goto out;
++
++      sb = dentry->d_sb;
++      br = au_sbr(sb, err);
++      mfs = &au_sbi(sb)->si_wbr_mfs;
++      mutex_lock(&mfs->mfs_lock);
++      watermark = mfs->mfsrr_watermark;
++      mutex_unlock(&mfs->mfs_lock);
++      if (br->br_wbr->wbr_bytes < watermark)
++              /* regardless the parent dir */
++              err = au_wbr_create_mfsrr(dentry, flags);
++
++out:
++      AuDbg("b%d\n", err);
++      return err;
++}
++
++/* ---------------------------------------------------------------------- */
++
 +/* policies for copyup */
 +
 +/* top down parent */
 +static int au_wbr_copyup_tdp(struct dentry *dentry)
 +{
-+      return au_wbr_create_tdp(dentry, /*isdir, anything is ok*/0);
++      return au_wbr_create_tdp(dentry, /*flags, anything is ok*/0);
 +}
 +
 +/* bottom up parent */
@@ -29002,6 +29417,16 @@ diff -urN /usr/share/empty/fs/aufs/wbr_policy.c linux/fs/aufs/wbr_policy.c
 +              .create = au_wbr_create_pmfs,
 +              .init   = au_wbr_create_init_mfs,
 +              .fin    = au_wbr_create_fin_mfs
++      },
++      [AuWbrCreate_PMFSRR] = {
++              .create = au_wbr_create_pmfsrr,
++              .init   = au_wbr_create_init_mfsrr,
++              .fin    = au_wbr_create_fin_mfs
++      },
++      [AuWbrCreate_PMFSRRV] = {
++              .create = au_wbr_create_pmfsrr,
++              .init   = au_wbr_create_init_mfsrr,
++              .fin    = au_wbr_create_fin_mfs
 +      }
 +};
 diff -urN /usr/share/empty/fs/aufs/whout.c linux/fs/aufs/whout.c
@@ -30123,7 +30548,7 @@ diff -urN /usr/share/empty/fs/aufs/whout.h linux/fs/aufs/whout.h
 +#endif /* __AUFS_WHOUT_H__ */
 diff -urN /usr/share/empty/fs/aufs/wkq.c linux/fs/aufs/wkq.c
 --- /usr/share/empty/fs/aufs/wkq.c     1970-01-01 01:00:00.000000000 +0100
-+++ linux/fs/aufs/wkq.c        2013-08-23 23:59:39.638250372 +0200
++++ linux/fs/aufs/wkq.c        2013-10-26 16:51:32.276373845 +0200
 @@ -0,0 +1,213 @@
 +/*
 + * Copyright (C) 2005-2013 Junjiro R. Okajima
@@ -30436,8 +30861,8 @@ diff -urN /usr/share/empty/fs/aufs/wkq.h linux/fs/aufs/wkq.h
 +#endif /* __AUFS_WKQ_H__ */
 diff -urN /usr/share/empty/fs/aufs/xino.c linux/fs/aufs/xino.c
 --- /usr/share/empty/fs/aufs/xino.c    1970-01-01 01:00:00.000000000 +0100
-+++ linux/fs/aufs/xino.c       2013-07-06 13:20:47.760198800 +0200
-@@ -0,0 +1,1264 @@
++++ linux/fs/aufs/xino.c       2013-10-26 16:51:32.276373845 +0200
+@@ -0,0 +1,1312 @@
 +/*
 + * Copyright (C) 2005-2013 Junjiro R. Okajima
 + *
@@ -30461,6 +30886,7 @@ diff -urN /usr/share/empty/fs/aufs/xino.c linux/fs/aufs/xino.c
 + */
 +
 +#include <linux/seq_file.h>
++#include <linux/statfs.h>
 +#include "aufs.h"
 +
 +/* todo: unnecessary to support mmap_sem since kernel-space? */
@@ -30682,28 +31108,46 @@ diff -urN /usr/share/empty/fs/aufs/xino.c linux/fs/aufs/xino.c
 +int au_xino_trunc(struct super_block *sb, aufs_bindex_t bindex)
 +{
 +      int err;
++      unsigned long jiffy;
++      blkcnt_t blocks;
 +      aufs_bindex_t bi, bend;
++      struct kstatfs *st;
 +      struct au_branch *br;
 +      struct file *new_xino, *file;
 +      struct super_block *h_sb;
 +      struct au_xino_lock_dir ldir;
 +
++      err = -ENOMEM;
++      st = kzalloc(sizeof(*st), GFP_NOFS);
++      if (unlikely(!st))
++              goto out;
++
 +      err = -EINVAL;
 +      bend = au_sbend(sb);
 +      if (unlikely(bindex < 0 || bend < bindex))
-+              goto out;
++              goto out_st;
 +      br = au_sbr(sb, bindex);
 +      file = br->br_xino.xi_file;
 +      if (!file)
-+              goto out;
++              goto out_st;
++
++      err = vfs_statfs(&file->f_path, st);
++      if (unlikely(err))
++              AuErr1("statfs err %d, ignored\n", err);
++      jiffy = jiffies;
++      blocks = file_inode(file)->i_blocks;
++      pr_info("begin truncating xino(b%d), ib%llu, %llu/%llu free blks\n",
++              bindex, (u64)blocks, st->f_bfree, st->f_blocks);
 +
 +      au_xino_lock_dir(sb, file, &ldir);
 +      /* mnt_want_write() is unnecessary here */
 +      new_xino = au_xino_create2(file, file);
 +      au_xino_unlock_dir(&ldir);
 +      err = PTR_ERR(new_xino);
-+      if (IS_ERR(new_xino))
-+              goto out;
++      if (IS_ERR(new_xino)) {
++              pr_err("err %d, ignored\n", err);
++              goto out_st;
++      }
 +      err = 0;
 +      fput(file);
 +      br->br_xino.xi_file = new_xino;
@@ -30721,6 +31165,18 @@ diff -urN /usr/share/empty/fs/aufs/xino.c linux/fs/aufs/xino.c
 +              get_file(new_xino);
 +      }
 +
++      err = vfs_statfs(&new_xino->f_path, st);
++      if (!err) {
++              pr_info("end truncating xino(b%d), ib%llu, %llu/%llu free blks\n",
++                      bindex, (u64)file_inode(new_xino)->i_blocks,
++                      st->f_bfree, st->f_blocks);
++              if (file_inode(new_xino)->i_blocks < blocks)
++                      au_sbi(sb)->si_xino_jiffy = jiffy;
++      } else
++              AuErr1("statfs err %d, ignored\n", err);
++
++out_st:
++      kfree(st);
 +out:
 +      return err;
 +}
@@ -30748,15 +31204,9 @@ diff -urN /usr/share/empty/fs/aufs/xino.c linux/fs/aufs/xino.c
 +      ii_read_lock_parent(dir);
 +      bindex = au_br_index(sb, br->br_id);
 +      err = au_xino_trunc(sb, bindex);
-+      if (!err
-+          && file_inode(br->br_xino.xi_file)->i_blocks
-+          >= br->br_xino_upper)
-+              br->br_xino_upper += AUFS_XINO_TRUNC_STEP;
-+
 +      ii_read_unlock(dir);
 +      if (unlikely(err))
-+              pr_warn("err b%d, upper %llu, (%d)\n",
-+                      bindex, (unsigned long long)br->br_xino_upper, err);
++              pr_warn("err b%d, (%d)\n", bindex, err);
 +      atomic_dec(&br->br_xino_running);
 +      atomic_dec(&br->br_count);
 +      si_write_unlock(sb);
@@ -30764,13 +31214,36 @@ diff -urN /usr/share/empty/fs/aufs/xino.c linux/fs/aufs/xino.c
 +      kfree(args);
 +}
 +
++static int xino_trunc_test(struct super_block *sb, struct au_branch *br)
++{
++      int err;
++      struct kstatfs st;
++      struct au_sbinfo *sbinfo;
++
++      /* todo: si_xino_expire and the ratio should be customizable */
++      sbinfo = au_sbi(sb);
++      if (time_before(jiffies,
++                      sbinfo->si_xino_jiffy + sbinfo->si_xino_expire))
++              return 0;
++
++      /* truncation border */
++      err = vfs_statfs(&br->br_xino.xi_file->f_path, &st);
++      if (unlikely(err)) {
++              AuErr1("statfs err %d, ignored\n", err);
++              return 0;
++      }
++      if (div64_u64(st.f_bfree * 100, st.f_blocks) >= AUFS_XINO_DEF_TRUNC)
++              return 0;
++
++      return 1;
++}
++
 +static void xino_try_trunc(struct super_block *sb, struct au_branch *br)
 +{
 +      struct xino_do_trunc_args *args;
 +      int wkq_err;
 +
-+      if (file_inode(br->br_xino.xi_file)->i_blocks
-+          < br->br_xino_upper)
++      if (!xino_trunc_test(sb, br))
 +              return;
 +
 +      if (atomic_inc_return(&br->br_xino_running) > 1)
@@ -31727,8 +32200,8 @@ diff -urN /usr/share/empty/include/linux/aufs_type.h linux/include/linux/aufs_ty
 +#include <uapi/linux/aufs_type.h>
 diff -urN /usr/share/empty/include/uapi/linux/aufs_type.h linux/include/uapi/linux/aufs_type.h
 --- /usr/share/empty/include/uapi/linux/aufs_type.h    1970-01-01 01:00:00.000000000 +0100
-+++ linux/include/uapi/linux/aufs_type.h       2013-08-23 23:59:39.638250372 +0200
-@@ -0,0 +1,251 @@
++++ linux/include/uapi/linux/aufs_type.h       2013-10-26 16:51:32.276373845 +0200
+@@ -0,0 +1,282 @@
 +/*
 + * Copyright (C) 2005-2013 Junjiro R. Okajima
 + *
@@ -31771,7 +32244,7 @@ diff -urN /usr/share/empty/include/uapi/linux/aufs_type.h linux/include/uapi/lin
 +
 +#include <linux/limits.h>
 +
-+#define AUFS_VERSION  "3.10-20130819"
++#define AUFS_VERSION  "3.x-rcN-20131014"
 +
 +/* todo? move this to linux-2.6.19/include/magic.h */
 +#define AUFS_SUPER_MAGIC      ('a' << 24 | 'u' << 16 | 'f' << 8 | 's')
@@ -31815,8 +32288,8 @@ diff -urN /usr/share/empty/include/uapi/linux/aufs_type.h linux/include/uapi/lin
 +                              - AUFS_WH_TMP_LEN)      /* hex */
 +#define AUFS_XINO_FNAME               "." AUFS_NAME ".xino"
 +#define AUFS_XINO_DEFPATH     "/tmp/" AUFS_XINO_FNAME
-+#define AUFS_XINO_TRUNC_INIT  64 /* blocks */
-+#define AUFS_XINO_TRUNC_STEP  4  /* blocks */
++#define AUFS_XINO_DEF_SEC     30 /* seconds */
++#define AUFS_XINO_DEF_TRUNC   45 /* percentage */
 +#define AUFS_DIRWH_DEF                3
 +#define AUFS_RDCACHE_DEF      10 /* seconds */
 +#define AUFS_RDCACHE_MAX      3600 /* seconds */
@@ -31959,12 +32432,43 @@ diff -urN /usr/share/empty/include/uapi/linux/aufs_type.h linux/include/uapi/lin
 +
 +/* ---------------------------------------------------------------------- */
 +
++/* error code for move-down */
++/* the actual message strings are implemented in aufs-util.git */
++enum {
++      EAU_MVDOWN_OPAQUE = 1,
++      EAU_MVDOWN_WHITEOUT,
++      EAU_MVDOWN_UPPER,
++      EAU_MVDOWN_BOTTOM,
++      EAU_MVDOWN_NOUPPER,
++      EAU_MVDOWN_NOLOWERBR,
++      EAU_Last
++};
++
 +/* flags for move-down */
-+#define AUFS_MVDOWN_VERBOSE   1
++#define AUFS_MVDOWN_DMSG      1
++#define AUFS_MVDOWN_OWLOWER   (1 << 1)        /* overwrite lower */
++#define AUFS_MVDOWN_KUPPER    (1 << 2)        /* keep upper */
++#define AUFS_MVDOWN_ROLOWER   (1 << 3)        /* do even if lower is RO */
++#define AUFS_MVDOWN_ROLOWER_R (1 << 4)        /* did on lower RO */
++#define AUFS_MVDOWN_ROUPPER   (1 << 5)        /* do even if upper is RO */
++#define AUFS_MVDOWN_ROUPPER_R (1 << 6)        /* did on upper RO */
++#define AUFS_MVDOWN_BRID_UPPER        (1 << 7)        /* upper brid */
++#define AUFS_MVDOWN_BRID_LOWER        (1 << 8)        /* lower brid */
 +/* will be added more */
 +
++enum {
++      AUFS_MVDOWN_UPPER,
++      AUFS_MVDOWN_LOWER,
++      AUFS_MVDOWN_NARRAY
++};
++
 +struct aufs_mvdown {
-+      uint8_t         flags;
++      uint32_t        flags;
++      struct {
++              int16_t         bindex;
++              int16_t         brid;
++      } a[AUFS_MVDOWN_NARRAY];
++      int8_t          au_errno;
 +      /* will be added more */
 +} __aligned(8);
 +
@@ -31976,7 +32480,7 @@ diff -urN /usr/share/empty/include/uapi/linux/aufs_type.h linux/include/uapi/lin
 +#define AUFS_CTL_WBR_FD               _IOW(AuCtlType, AuCtl_WBR_FD, \
 +                                   struct aufs_wbr_fd)
 +#define AUFS_CTL_IBUSY                _IOWR(AuCtlType, AuCtl_IBUSY, struct aufs_ibusy)
-+#define AUFS_CTL_MVDOWN               _IOR(AuCtlType, AuCtl_MVDOWN, \
-+                                   struct aufs_mvdown)
++#define AUFS_CTL_MVDOWN               _IOWR(AuCtlType, AuCtl_MVDOWN, \
++                                    struct aufs_mvdown)
 +
 +#endif /* __AUFS_TYPE_H__ */
index 2079a613ce1b063775711a528ae72a8581c972ac..ab710706d9727d4f6efe53e83a6774638b778bbe 100644 (file)
@@ -2,7 +2,12 @@
 #-
 #- *** FILE: arch/* - ARCH SPECIFIC OPTIONS ***
 #-
+ARCH_MEMORY_PROBE all=n
+KVM_DEBUG_FS all=n
 KVM_DEVICE_ASSIGNMENT all=y
+PHYSICAL_ALIGN all=0x1000000
+X86_DEBUG_STATIC_CPU_HAS all=n
+X86_SYSFB all=y
 
 #-
 #- *** FILE: block/Kconfig ***
@@ -13,6 +18,7 @@ BLK_DEV_BSG all=y
 BLK_DEV_BSGLIB all=y
 BLK_DEV_INTEGRITY all=y
 BLK_DEV_THROTTLING all=y
+BLK_CMDLINE_PARSER all=y
 #- file block/partitions/Kconfig goes here
 #- file block/Kconfig.iosched goes here
 
@@ -39,6 +45,7 @@ ACORN_PARTITION_ICS all=y
 ACORN_PARTITION_ADFS all=y
 ACORN_PARTITION_POWERTEC all=y
 ACORN_PARTITION_RISCIX all=y
+AIX_PARTITION all=y
 OSF_PARTITION all=y
 AMIGA_PARTITION all=y
 ATARI_PARTITION all=y
@@ -56,6 +63,7 @@ SUN_PARTITION all=y
 KARMA_PARTITION all=y
 EFI_PARTITION all=y
 SYSV68_PARTITION all=y
+CMDLINE_PARTITION all=y
 
 #-
 #- *** FILE: crypto/Kconfig ***
@@ -99,6 +107,8 @@ CRYPTO_CRC32C all=m
 CRYPTO_CRC32C_INTEL all=m
 CRYPTO_CRC32 all=m
 CRYPTO_CRC32_PCLMUL all=m
+CRYPTO_CRCT10DIF all=m
+CRYPTO_CRCT10DIF_PCLMUL all=m
 CRYPTO_GHASH all=m
 CRYPTO_MD4 all=m
 CRYPTO_MD5 all=y
@@ -155,6 +165,8 @@ CRYPTO_TWOFISH_AVX_X86_64 all=m
 CRYPTO_DEFLATE all=m
 CRYPTO_ZLIB all=m
 CRYPTO_LZO all=y
+CRYPTO_LZ4 all=m
+CRYPTO_LZ4HC all=m
 #- Random Number Generation
 CRYPTO_ANSI_CPRNG all=m
 CRYPTO_USER_API_HASH all=m
@@ -184,7 +196,6 @@ ACPI_SLEEP x86=y
 ACPI_PROCFS all=y
 ACPI_PROCFS_POWER ia64=y x86=y
 ACPI_EC_DEBUGFS all=m
-ACPI_PROC_EVENT all=y
 ACPI_AC x86=m
 ACPI_BATTERY x86=m
 ACPI_BUTTON all=m
@@ -232,6 +243,7 @@ SATA_PMP all=y sparc=n
 #- Controllers with non-SFF native interface
 SATA_AHCI all=m sparc=n
 SATA_AHCI_PLATFORM all=m
+AHCI_IMX all=m
 SATA_FSL ppc=m
 SATA_INIC162X all=m
 SATA_ACARD_AHCI all=m
@@ -248,6 +260,7 @@ SATA_HIGHBANK all=m
 SATA_MV all=m sparc=n
 SATA_NV all=m sparc=n
 SATA_PROMISE all=m sparc=n
+SATA_RCAR all=m
 SATA_SIL all=m sparc=n
 SATA_SIS all=m sparc=n
 SATA_SVW all=m sparc=n
@@ -381,6 +394,7 @@ BCMA_POSSIBLE all=y
 BCMA all=m
 BCMA_HOST_PCI_POSSIBLE all=y
 BCMA_HOST_PCI all=y
+BCMA_HOST_SOC all=y
 BCMA_DRIVER_GMAC_CMN all=y
 BCMA_DRIVER_GPIO all=y
 BCMA_DEBUG all=n
@@ -498,7 +512,6 @@ OMAP_OCP2SCP all=m
 #-
 #- file drivers/tty/Kconfig goes here
 DEVKMEM all=y
-STALDRV all=y
 SGI_SNSC ia64=y
 SGI_TIOCX ia64=y
 SGI_MBCS ia64=m
@@ -604,12 +617,14 @@ TCG_NSC all=m
 TCG_ATMEL all=m
 TCG_INFINEON all=m
 TCG_ST33_I2C all=m
+TCG_XEN all=m
 
 #-
 #- *** FILE: drivers/clk/Kconfig ***
 #-
 COMMON_CLK_DEBUG all=n
 COMMON_CLK_WM831X all=m
+COMMON_CLK_SI5351 all=m
 #- file drivers/clk/mvebu/Kconfig goes here
 
 #-
@@ -649,6 +664,8 @@ X86_AMD_FREQ_SENSITIVITY all=m
 #-
 CPU_IDLE i386=y sparc64=n x86_64=y
 CPU_IDLE_MULTIPLE_DRIVERS all=y
+CPU_IDLE_GOV_LADDER all=y
+#- file drivers/cpuidle/Kconfig.arm goes here
 
 #-
 #- *** FILE: drivers/crypto/Kconfig ***
@@ -684,8 +701,7 @@ DMADEVICES_DEBUG all=n
 #- DMA Devices
 INTEL_MID_DMAC all=m
 INTEL_IOATDMA i386=m x86_64=m
-DW_DMAC all=m
-DW_DMAC_BIG_ENDIAN_IO all=n
+#- file drivers/dma/dw/Kconfig goes here
 FSL_DMA ppc=y ppc64=y
 #- file drivers/dma/bestcomm/Kconfig goes here
 #- file drivers/dma/sh/Kconfig goes here
@@ -697,6 +713,14 @@ NET_DMA all=y
 ASYNC_TX_DMA all=y
 DMATEST all=n
 
+#-
+#- *** FILE: drivers/dma/dw/Kconfig ***
+#-
+DW_DMAC_CORE all=m
+DW_DMAC all=m
+DW_DMAC_PCI all=m
+DW_DMAC_BIG_ENDIAN_IO all=n
+
 #-
 #- *** FILE: drivers/edac/Kconfig ***
 #-
@@ -784,6 +808,15 @@ GOOGLE_FIRMWARE all=y
 GOOGLE_SMI all=m
 GOOGLE_MEMCONSOLE all=m
 
+#-
+#- *** FILE: drivers/fmc/Kconfig ***
+#-
+FMC all=m
+FMC_FAKEDEV all=m
+FMC_TRIVIAL all=m
+FMC_WRITE_EEPROM all=m
+FMC_CHARDEV all=m
+
 #-
 #- *** FILE: drivers/gpio/Kconfig ***
 #-
@@ -794,6 +827,7 @@ GPIO_DA9052 all=m
 #- Memory mapped GPIO drivers:
 GPIO_GENERIC_PLATFORM all=m
 GPIO_IT8761E all=m
+GPIO_F7188X all=m
 GPIO_TS5500 all=m
 GPIO_XILINX powerpc=y
 GPIO_SCH all=m
@@ -828,6 +862,8 @@ GPIO_MC33880 all=m
 GPIO_74X164 all=m
 #- AC97 GPIO expanders:
 GPIO_UCB1400 all=y
+#- LPC GPIO expanders:
+GPIO_KEMPLD all=m
 #- MODULbus GPIO expanders:
 GPIO_JANZ_TTL all=m
 #- USB GPIO expanders:
@@ -847,6 +883,7 @@ DRM_RADEON all=m
 DRM_I810 i386=m x86_64=m
 DRM_I915 i386=m x86_64=m
 DRM_I915_KMS all=y
+DRM_I915_PRELIMINARY_HW_SUPPORT all=y
 DRM_MGA all=m
 DRM_SIS all=m
 DRM_VIA all=m
@@ -858,10 +895,12 @@ DRM_SAVAGE all=m
 #- file drivers/gpu/drm/ast/Kconfig goes here
 #- file drivers/gpu/drm/mgag200/Kconfig goes here
 #- file drivers/gpu/drm/cirrus/Kconfig goes here
+#- file drivers/gpu/drm/rcar-du/Kconfig goes here
 #- file drivers/gpu/drm/shmobile/Kconfig goes here
 #- file drivers/gpu/drm/omapdrm/Kconfig goes here
 #- file drivers/gpu/drm/tilcdc/Kconfig goes here
 #- file drivers/gpu/drm/qxl/Kconfig goes here
+#- file drivers/gpu/drm/msm/Kconfig goes here
 
 #-
 #- *** FILE: drivers/gpu/drm/ast/Kconfig ***
@@ -950,9 +989,11 @@ HID_DRAGONRISE all=m
 DRAGONRISE_FF all=y
 HID_EMS_FF all=m
 HID_ELECOM all=m
+HID_ELO all=m
 HID_EZKEY all=m
 HID_HOLTEK all=m
 HOLTEK_FF all=y
+HID_HUION all=m
 HID_KEYTOUCH all=m
 HID_KYE all=m
 HID_UCLOGIC all=m
@@ -984,7 +1025,6 @@ HID_PICOLCD_BACKLIGHT all=y
 HID_PICOLCD_LCD all=y
 HID_PICOLCD_LEDS all=y
 HID_PRIMAX all=m
-HID_PS3REMOTE all=m
 HID_ROCCAT all=m
 HID_SAITEK all=m
 HID_SAMSUNG all=m
@@ -1004,7 +1044,7 @@ HID_THRUSTMASTER all=m
 THRUSTMASTER_FF all=y
 HID_WACOM all=m
 HID_WIIMOTE all=m
-HID_WIIMOTE_EXT all=y
+HID_XINMO all=m
 HID_ZEROPLUS all=m
 ZEROPLUS_FF all=y
 HID_ZYDACRON all=m
@@ -1086,10 +1126,12 @@ SENSORS_F71882FG all=m
 SENSORS_F75375S all=m
 SENSORS_FSCHMD all=m
 SENSORS_G760A all=m
+SENSORS_G762 all=m
 SENSORS_GL518SM all=m
 SENSORS_GL520SM all=m
 SENSORS_GPIO_FAN all=m
 SENSORS_HIH6130 all=m
+SENSORS_HTU21 all=m
 SENSORS_CORETEMP all=m
 SENSORS_IBMAEM all=m
 SENSORS_IBMPEX all=m
@@ -1251,7 +1293,7 @@ I2C_DESIGNWARE_PLATFORM all=m
 I2C_DESIGNWARE_PCI all=m
 I2C_EG20T all=m
 I2C_GPIO all=m
-I2C_INTEL_MID all=m
+I2C_KEMPLD all=m
 I2C_MPC ppc=n
 I2C_OCORES all=m
 I2C_PASEMI ppc64=m
@@ -1280,6 +1322,7 @@ SCx200_ACB i386=m
 I2C_MUX_GPIO all=m
 I2C_MUX_PCA9541 all=m
 I2C_MUX_PCA954x all=m
+I2C_MUX_PINCTRL all=m
 
 #-
 #- *** FILE: drivers/ide/Kconfig ***
@@ -1379,25 +1422,31 @@ IIO_CONSUMERS_PER_TRIGGER all=2
 #- file drivers/iio/imu/Kconfig goes here
 #- file drivers/iio/light/Kconfig goes here
 #- file drivers/iio/magnetometer/Kconfig goes here
+#- file drivers/iio/trigger/Kconfig goes here
+#- file drivers/iio/pressure/Kconfig goes here
+#- file drivers/iio/temperature/Kconfig goes here
 
 #-
 #- *** FILE: drivers/iio/accel/Kconfig ***
 #-
+BMA180 all=m
 HID_SENSOR_ACCEL_3D all=m
-KXSD9 all=m
 IIO_ST_ACCEL_3AXIS all=m
+KXSD9 all=m
 
 #-
 #- *** FILE: drivers/iio/adc/Kconfig ***
 #-
 AD7266 all=m
 AD7298 all=m
-AD7923 all=m
+AD7476 all=m
 AD7791 all=m
 AD7793 all=m
-AD7476 all=m
 AD7887 all=m
+AD7923 all=m
 MAX1363 all=m
+MCP320X all=m
+NAU7802 all=m
 TI_ADC081C all=m
 TI_AM335X_ADC all=m
 VIPERBOARD_ADC all=m
@@ -1419,14 +1468,15 @@ AD5064 all=m
 AD5360 all=m
 AD5380 all=m
 AD5421 all=m
-AD5624R_SPI all=m
 AD5446 all=m
 AD5449 all=m
 AD5504 all=m
+AD5624R_SPI all=m
+AD5686 all=m
 AD5755 all=m
 AD5764 all=m
 AD5791 all=m
-AD5686 all=m
+AD7303 all=m
 MAX517 all=m
 MCP4725 all=m
 
@@ -1440,7 +1490,9 @@ ADF4350 all=m
 #- *** FILE: drivers/iio/gyro/Kconfig ***
 #-
 ADIS16080 all=m
+ADIS16130 all=m
 ADIS16136 all=m
+ADIS16260 all=m
 ADXRS450 all=m
 HID_SENSOR_GYRO_3D all=m
 IIO_ST_GYRO_3AXIS all=m
@@ -1462,10 +1514,11 @@ INV_MPU6050_IIO all=m
 #- *** FILE: drivers/iio/light/Kconfig ***
 #-
 ADJD_S311 all=m
+APDS9300 all=m
+HID_SENSOR_ALS all=m
 SENSORS_LM3533 all=m
 SENSORS_TSL2563 all=m
 VCNL4000 all=m
-HID_SENSOR_ALS all=m
 
 #-
 #- *** FILE: drivers/iio/magnetometer/Kconfig ***
@@ -1474,6 +1527,22 @@ AK8975 all=m
 HID_SENSOR_MAGNETOMETER_3D all=m
 IIO_ST_MAGN_3AXIS all=m
 
+#-
+#- *** FILE: drivers/iio/pressure/Kconfig ***
+#-
+IIO_ST_PRESS all=m
+
+#-
+#- *** FILE: drivers/iio/temperature/Kconfig ***
+#-
+TMP006 all=m
+
+#-
+#- *** FILE: drivers/iio/trigger/Kconfig ***
+#-
+IIO_INTERRUPT_TRIGGER all=m
+IIO_SYSFS_TRIGGER all=m
+
 #-
 #- *** FILE: drivers/infiniband/Kconfig ***
 #-
@@ -1490,6 +1559,7 @@ INFINIBAND_ADDR_TRANS all=y sparc=
 #- file drivers/infiniband/hw/cxgb3/Kconfig goes here
 #- file drivers/infiniband/hw/cxgb4/Kconfig goes here
 #- file drivers/infiniband/hw/mlx4/Kconfig goes here
+#- file drivers/infiniband/hw/mlx5/Kconfig goes here
 #- file drivers/infiniband/hw/nes/Kconfig goes here
 #- file drivers/infiniband/hw/ocrdma/Kconfig goes here
 #- file drivers/infiniband/ulp/ipoib/Kconfig goes here
@@ -1525,6 +1595,11 @@ INFINIBAND_IPATH all=m
 #-
 MLX4_INFINIBAND all=m sparc=
 
+#-
+#- *** FILE: drivers/infiniband/hw/mlx5/Kconfig ***
+#-
+MLX5_INFINIBAND all=m
+
 #-
 #- *** FILE: drivers/infiniband/hw/mthca/Kconfig ***
 #-
@@ -1545,6 +1620,7 @@ INFINIBAND_OCRDMA all=m
 #- *** FILE: drivers/infiniband/hw/qib/Kconfig ***
 #-
 INFINIBAND_QIB all=m
+INFINIBAND_QIB_DCA all=y
 
 #-
 #- *** FILE: drivers/infiniband/ulp/ipoib/Kconfig ***
@@ -1724,6 +1800,7 @@ INPUT_IMS_PCU all=m
 INPUT_CMA3000 all=m
 INPUT_CMA3000_I2C all=m
 INPUT_XEN_KBDDEV_FRONTEND all=m
+INPUT_IDEAPAD_SLIDEBAR all=m
 
 #-
 #- *** FILE: drivers/input/mouse/Kconfig ***
@@ -1794,6 +1871,9 @@ TOUCHSCREEN_CY8CTMG110 all=m
 TOUCHSCREEN_CYTTSP_CORE all=m
 TOUCHSCREEN_CYTTSP_I2C all=m
 TOUCHSCREEN_CYTTSP_SPI all=m
+TOUCHSCREEN_CYTTSP4_CORE all=m
+TOUCHSCREEN_CYTTSP4_I2C all=m
+TOUCHSCREEN_CYTTSP4_SPI all=m
 TOUCHSCREEN_DA9034 all=m
 TOUCHSCREEN_DA9052 all=m
 TOUCHSCREEN_DYNAPRO all=m
@@ -2033,9 +2113,10 @@ LEDS_LP3944 all=m
 LEDS_LP5521 all=m
 LEDS_LP5523 all=m
 LEDS_LP5562 all=m
+LEDS_LP8501 all=m
 LEDS_CLEVO_MAIL all=m
 LEDS_PCA955X all=m
-LEDS_PCA9633 all=m
+LEDS_PCA963X all=m
 LEDS_WM831X_STATUS all=m
 LEDS_WM8350 all=m
 LEDS_DA903X all=m
@@ -2048,7 +2129,6 @@ LEDS_INTEL_SS4200 all=m
 LEDS_LT3593 all=m
 LEDS_DELL_NETBOOKS all=m
 LEDS_MC13783 all=m
-LEDS_RENESAS_TPU all=y
 LEDS_TCA6507 all=m
 LEDS_LM355x all=m
 LEDS_OT200 all=m
@@ -2143,6 +2223,7 @@ DM_DELAY all=m
 DM_UEVENT all=y
 DM_FLAKEY all=m
 DM_VERITY all=m
+DM_SWITCH all=m
 
 #-
 #- *** FILE: drivers/md/bcache/Kconfig ***
@@ -2441,6 +2522,7 @@ VIDEO_CX88 all=m sparc=n
 VIDEO_CX88_ALSA all=m
 VIDEO_CX88_BLACKBIRD all=m
 VIDEO_CX88_DVB all=m sparc64=n
+VIDEO_CX88_ENABLE_VP3054 all=y
 VIDEO_CX88_VP3054 all=m
 
 #-
@@ -2546,6 +2628,7 @@ VIDEO_TIMBERDALE all=m
 V4L_MEM2MEM_DRIVERS all=y
 VIDEO_MEM2MEM_DEINTERLACE all=m
 VIDEO_SH_VEU all=m
+VIDEO_RENESAS_VSP1 all=m
 V4L_TEST_DRIVERS all=n
 VIDEO_VIVI all=m
 VIDEO_MEM2MEM_TESTDEV all=m
@@ -2560,6 +2643,7 @@ VIDEO_CAFE_CCIC all=m sparc=n
 #-
 SOC_CAMERA all=m
 SOC_CAMERA_PLATFORM all=m
+VIDEO_RCAR_VIN all=m
 VIDEO_SH_MOBILE_CSI2 all=m
 VIDEO_SH_MOBILE_CEU all=m
 
@@ -2664,6 +2748,7 @@ MEDIA_USB_SUPPORT all=y
 #- file drivers/media/usb/stkwebcam/Kconfig goes here
 #- file drivers/media/usb/s2255/Kconfig goes here
 #- file drivers/media/usb/sn9c102/Kconfig goes here
+#- file drivers/media/usb/usbtv/Kconfig goes here
 #- Analog TV USB devices
 #- file drivers/media/usb/pvrusb2/Kconfig goes here
 #- file drivers/media/usb/hdpvr/Kconfig goes here
@@ -2806,6 +2891,7 @@ USB_GSPCA_SQ905 all=m
 USB_GSPCA_SQ905C all=m
 USB_GSPCA_SQ930X all=m
 USB_GSPCA_STK014 all=m
+USB_GSPCA_STK1135 all=m
 USB_GSPCA_STV0680 all=m
 USB_GSPCA_SUNPLUS all=m
 USB_GSPCA_T613 all=m
@@ -2869,8 +2955,9 @@ USB_SN9C102 all=m
 #-
 #- *** FILE: drivers/media/usb/stk1160/Kconfig ***
 #-
-VIDEO_STK1160 all=m
+VIDEO_STK1160_COMMON all=m
 VIDEO_STK1160_AC97 all=y
+VIDEO_STK1160 all=m
 
 #-
 #- *** FILE: drivers/media/usb/stkwebcam/Kconfig ***
@@ -2899,6 +2986,11 @@ DVB_TTUSB_BUDGET all=m
 #-
 DVB_TTUSB_DEC all=m
 
+#-
+#- *** FILE: drivers/media/usb/usbtv/Kconfig ***
+#-
+VIDEO_USBTV all=m
+
 #-
 #- *** FILE: drivers/media/usb/usbvision/Kconfig ***
 #-
@@ -2946,6 +3038,7 @@ MEMSTICK_DEBUG all=n
 #- MemoryStick drivers
 MEMSTICK_UNSAFE_RESUME all=n
 MSPRO_BLOCK all=m
+MS_BLOCK all=m
 
 #-
 #- *** FILE: drivers/memstick/host/Kconfig ***
@@ -2999,6 +3092,7 @@ HTC_PASIC3 all=m
 LPC_ICH all=m
 LPC_SCH all=m
 MFD_JANZ_CMODIO all=m
+MFD_KEMPLD all=m
 EZX_PCAP all=y
 MFD_VIPERBOARD all=m
 MFD_RETU all=m
@@ -3035,6 +3129,7 @@ MFD_ARIZONA_I2C all=m
 MFD_ARIZONA_SPI all=m
 MFD_WM5102 all=y
 MFD_WM5110 all=y
+MFD_WM8997 all=y
 MFD_WM831X all=y
 MFD_WM831X_SPI all=y
 MFD_WM8350_I2C all=y
@@ -3270,10 +3365,6 @@ MTDRAM_ERASE_SIZE all=128
 MTD_BLOCK2MTD all=m
 #- Disk-On-Chip Device Drivers
 MTD_DOCG3 all=m
-MTD_DOCPROBE all=m
-MTD_DOCECC all=m
-MTD_DOCPROBE_ADVANCED all=n
-MTD_DOCPROBE_ADDRESS all=0x0
 
 #-
 #- *** FILE: drivers/mtd/lpddr/Kconfig ***
@@ -3322,6 +3413,7 @@ MTD_NAND_DENALI all=m
 MTD_NAND_DENALI_PCI all=m
 MTD_NAND_DENALI_DT all=m
 MTD_NAND_DENALI_SCRATCH_REG_ADDR all=0xFF108018
+MTD_NAND_GPIO all=m
 MTD_NAND_IDS all=m
 MTD_NAND_RICOH all=m
 MTD_NAND_DISKONCHIP all=m
@@ -3334,7 +3426,6 @@ MTD_NAND_CS553X i386=m
 MTD_NAND_PASEMI ppc64=m
 MTD_NAND_NANDSIM all=m ppc=n ppc64=n sparc=n
 MTD_NAND_PLATFORM all=m sparc=n
-MTD_ALAUDA all=m
 MTD_NAND_FSL_ELBC ppc=m ppc64=m
 
 #-
@@ -3359,11 +3450,12 @@ MTD_UBI_GLUEBI all=n powerpc=m
 #- *** FILE: drivers/net/Kconfig ***
 #-
 NETDEVICES all=y
+MII all=m
+NET_CORE all=y
 BONDING all=m
 DUMMY all=m
 EQUALIZER all=m
 NET_FC all=y
-MII all=m
 IFB all=m
 #- file drivers/net/team/Kconfig goes here
 MACVLAN all=m
@@ -3379,6 +3471,7 @@ RIONET_RX_SIZE all=128
 TUN all=m
 VETH all=m
 VIRTIO_NET all=m
+NLMON all=m
 #- file drivers/net/arcnet/Kconfig goes here
 #- file drivers/atm/Kconfig goes here
 #- file drivers/net/caif/Kconfig goes here
@@ -3540,9 +3633,11 @@ WD80x3 alpha=m i386=m
 #- file drivers/net/ethernet/3com/Kconfig goes here
 #- file drivers/net/ethernet/adaptec/Kconfig goes here
 #- file drivers/net/ethernet/aeroflex/Kconfig goes here
+#- file drivers/net/ethernet/allwinner/Kconfig goes here
 #- file drivers/net/ethernet/alteon/Kconfig goes here
 #- file drivers/net/ethernet/amd/Kconfig goes here
 #- file drivers/net/ethernet/apple/Kconfig goes here
+#- file drivers/net/ethernet/arc/Kconfig goes here
 #- file drivers/net/ethernet/atheros/Kconfig goes here
 #- file drivers/net/ethernet/cadence/Kconfig goes here
 #- file drivers/net/ethernet/adi/Kconfig goes here
@@ -3572,6 +3667,7 @@ JME all=m
 #- file drivers/net/ethernet/mellanox/Kconfig goes here
 #- file drivers/net/ethernet/micrel/Kconfig goes here
 #- file drivers/net/ethernet/microchip/Kconfig goes here
+#- file drivers/net/ethernet/moxa/Kconfig goes here
 #- file drivers/net/ethernet/myricom/Kconfig goes here
 FEALNX all=m
 #- file drivers/net/ethernet/natsemi/Kconfig goes here
@@ -3637,6 +3733,11 @@ MACE ppc=m
 MACE_AAUI_PORT ppc=y
 BMAC ppc=m
 
+#-
+#- *** FILE: drivers/net/ethernet/arc/Kconfig ***
+#-
+NET_VENDOR_ARC all=y
+
 #-
 #- *** FILE: drivers/net/ethernet/atheros/Kconfig ***
 #-
@@ -3800,6 +3901,7 @@ IXGBE_HWMON all=y
 IXGBE_DCA all=y
 IXGBE_DCB all=y
 IXGBEVF all=m
+I40E all=m
 
 #-
 #- *** FILE: drivers/net/ethernet/marvell/Kconfig ***
@@ -3894,6 +3996,7 @@ NET_VENDOR_QLOGIC all=y
 QLA3XXX all=m sparc=n
 QLCNIC all=m
 QLCNIC_SRIOV all=y
+QLCNIC_DCB all=y
 QLGE all=m
 NETXEN_NIC all=m sparc=n
 
@@ -3916,6 +4019,11 @@ ATP i386=m x86_64=m
 8139_OLD_RX_RESET all=n ppc=y ppc64=y
 R8169 all=m sparc=n
 
+#-
+#- *** FILE: drivers/net/ethernet/renesas/Kconfig ***
+#-
+SH_ETH all=m
+
 #-
 #- *** FILE: drivers/net/ethernet/seeq/Kconfig ***
 #-
@@ -3949,6 +4057,7 @@ NET_VENDOR_SMSC all=y
 SMC9194 alpha=m i386=m
 PCMCIA_SMC91C92 all=m
 EPIC100 all=m
+SMSC911X all=m
 SMSC9420 all=m
 
 #-
@@ -4188,6 +4297,7 @@ USB_NET_CDC_EEM all=m
 USB_NET_CDC_NCM all=m
 USB_NET_CDC_MBIM all=m
 USB_NET_DM9601 all=m
+USB_NET_SR9700 all=m
 USB_NET_SMSC75XX all=m
 USB_NET_SMSC95XX all=m
 USB_NET_GL620A all=m
@@ -4291,6 +4401,7 @@ MWL8K all=m
 #- file drivers/net/wireless/ti/Kconfig goes here
 #- file drivers/net/wireless/zd1211rw/Kconfig goes here
 #- file drivers/net/wireless/mwifiex/Kconfig goes here
+#- file drivers/net/wireless/cw1200/Kconfig goes here
 
 #-
 #- *** FILE: drivers/net/wireless/ath/Kconfig ***
@@ -4304,12 +4415,22 @@ ATH_DEBUG all=n
 #- file drivers/net/wireless/ath/ath6kl/Kconfig goes here
 #- file drivers/net/wireless/ath/ar5523/Kconfig goes here
 #- file drivers/net/wireless/ath/wil6210/Kconfig goes here
+#- file drivers/net/wireless/ath/ath10k/Kconfig goes here
 
 #-
 #- *** FILE: drivers/net/wireless/ath/ar5523/Kconfig ***
 #-
 AR5523 all=m
 
+#-
+#- *** FILE: drivers/net/wireless/ath/ath10k/Kconfig ***
+#-
+ATH10K all=m
+ATH10K_PCI all=m
+ATH10K_DEBUG all=n
+ATH10K_DEBUGFS all=n
+ATH10K_TRACING all=n
+
 #-
 #- *** FILE: drivers/net/wireless/ath/ath5k/Kconfig ***
 #-
@@ -4350,13 +4471,13 @@ CARL9170_HWRNG all=y
 #-
 WIL6210 all=m
 WIL6210_ISR_COR all=y
+WIL6210_TRACING all=y
 
 #-
 #- *** FILE: drivers/net/wireless/b43/Kconfig ***
 #-
 B43 all=m
 B43_BCMA all=y
-B43_BCMA_EXTRA all=y
 B43_PCMCIA all=y
 B43_SDIO all=y
 B43_PHY_N all=y
@@ -4384,6 +4505,13 @@ BRCMFMAC_USB all=y
 BRCM_TRACING all=y
 BRCMDBG all=n
 
+#-
+#- *** FILE: drivers/net/wireless/cw1200/Kconfig ***
+#-
+CW1200 all=m
+CW1200_WLAN_SDIO all=m
+CW1200_WLAN_SPI all=m
+
 #-
 #- *** FILE: drivers/net/wireless/hostap/Kconfig ***
 #-
@@ -4425,7 +4553,6 @@ IWLMVM all=m
 IWLWIFI_DEBUG all=y
 IWLWIFI_DEBUG_EXPERIMENTAL_UCODE all=y
 IWLWIFI_DEVICE_TRACING all=n
-IWLWIFI_P2P all=y
 
 #-
 #- *** FILE: drivers/net/wireless/libertas/Kconfig ***
@@ -4487,6 +4614,7 @@ RT73USB all=m
 RT2800USB all=m
 RT2800USB_RT33XX all=y
 RT2800USB_RT35XX all=y
+RT2800USB_RT3573 all=y
 RT2800USB_RT53XX all=y
 RT2800USB_RT55XX all=y
 RT2800USB_UNKNOWN all=y
@@ -4501,14 +4629,15 @@ RTL8187 all=m
 #-
 #- *** FILE: drivers/net/wireless/rtlwifi/Kconfig ***
 #-
-RTLWIFI all=m
-RTLWIFI_DEBUG all=n
+RTL_CARDS all=m
 RTL8192CE all=m
 RTL8192SE all=m
 RTL8192DE all=m
 RTL8723AE all=m
 RTL8188EE all=m
 RTL8192CU all=m
+RTLWIFI all=m
+RTLWIFI_DEBUG all=n
 RTL8192C_COMMON all=m
 
 #-
@@ -4556,6 +4685,7 @@ ZD1211RW_DEBUG all=n
 NFC_PN533 all=m
 NFC_WILINK all=m
 NFC_MEI_PHY all=m
+NFC_SIM all=m
 #- file drivers/nfc/pn544/Kconfig goes here
 #- file drivers/nfc/microread/Kconfig goes here
 
@@ -4605,7 +4735,6 @@ PARPORT_NOT_PC all=y
 #-
 #- *** FILE: drivers/pci/Kconfig ***
 #-
-ARCH_SUPPORTS_MSI ppc=y sparc=n sparc64=y
 PCI_MSI all=y sparc64=n
 PCI_DEBUG all=n
 PCI_REALLOC_ENABLE_AUTO all=y
@@ -4617,15 +4746,16 @@ PCI_PRI all=y
 PCI_PASID all=y
 PCI_IOAPIC all=m
 PCI_LABEL all=y
+#- file drivers/pci/host/Kconfig goes here
 
 #-
 #- *** FILE: drivers/pci/hotplug/Kconfig ***
 #-
-HOTPLUG_PCI all=m
+HOTPLUG_PCI all=y
 HOTPLUG_PCI_COMPAQ i386=m
 HOTPLUG_PCI_COMPAQ_NVRAM i386=y
 HOTPLUG_PCI_IBM i386=m
-HOTPLUG_PCI_ACPI all=m
+HOTPLUG_PCI_ACPI all=y
 HOTPLUG_PCI_ACPI_IBM all=m
 HOTPLUG_PCI_CPCI all=y
 HOTPLUG_PCI_CPCI_ZT5550 i386=m x86_64=m
@@ -4638,7 +4768,7 @@ HOTPLUG_PCI_SGI ia64=m
 #- *** FILE: drivers/pci/pcie/Kconfig ***
 #-
 PCIEPORTBUS all=y
-HOTPLUG_PCI_PCIE all=m
+HOTPLUG_PCI_PCIE all=y
 #- file drivers/pci/pcie/aer/Kconfig goes here
 PCIEASPM all=y
 PCIEASPM_DEBUG all=n
@@ -4681,6 +4811,18 @@ PCMCIA_PROBE alpha=y i386=y
 ELECTRA_CF ppc64=m
 PCCARD_NONSTATIC all=y
 
+#-
+#- *** FILE: drivers/pinctrl/Kconfig ***
+#-
+PINMUX all=y
+PINCONF all=y
+DEBUG_PINCTRL all=n
+PINCTRL_BAYTRAIL all=y
+#- file drivers/pinctrl/mvebu/Kconfig goes here
+#- file drivers/pinctrl/sh-pfc/Kconfig goes here
+#- file drivers/pinctrl/spear/Kconfig goes here
+#- file drivers/pinctrl/vt8500/Kconfig goes here
+
 #-
 #- *** FILE: drivers/platform/x86/Kconfig ***
 #-
@@ -4734,6 +4876,8 @@ MXM_WMI all=m
 INTEL_OAKTRAIL all=m
 SAMSUNG_Q10 all=m
 APPLE_GMUX all=m
+INTEL_RST all=m
+INTEL_SMARTCONNECT all=m
 PVPANIC all=m
 
 #-
@@ -4796,6 +4940,7 @@ CHARGER_LP8727 all=m
 CHARGER_GPIO all=m
 CHARGER_MANAGER all=y
 CHARGER_BQ2415X all=m
+CHARGER_BQ24190 all=m
 CHARGER_SMB347 all=m
 AB8500_BM all=n
 BATTERY_GOLDFISH all=m
@@ -4864,7 +5009,6 @@ RAPIDIO_TSI57X all=y
 RAPIDIO_CPS_XX all=y
 RAPIDIO_TSI568 all=y
 RAPIDIO_CPS_GEN2 all=y
-RAPIDIO_TSI500 all=y
 
 #-
 #- *** FILE: drivers/regulator/Kconfig ***
@@ -4875,28 +5019,31 @@ REGULATOR_DUMMY all=n
 REGULATOR_FIXED_VOLTAGE all=m
 REGULATOR_VIRTUAL_CONSUMER all=m
 REGULATOR_USERSPACE_CONSUMER all=m
-REGULATOR_GPIO all=m
 REGULATOR_AD5398 all=m
+REGULATOR_ANATOP all=m
+REGULATOR_AB3100 all=m
+REGULATOR_AB8500 all=y
 REGULATOR_ARIZONA all=m
 REGULATOR_DA903X all=m
 REGULATOR_DA9052 all=m
+REGULATOR_DA9210 all=m
 REGULATOR_FAN53555 all=m
-REGULATOR_ANATOP all=m
-REGULATOR_MC13783 all=m
-REGULATOR_MC13892 all=m
+REGULATOR_GPIO all=m
 REGULATOR_ISL6271A all=m
+REGULATOR_LP3971 all=m
+REGULATOR_LP3972 all=m
+REGULATOR_LP872X all=m
+REGULATOR_LP8755 all=m
 REGULATOR_MAX1586 all=m
 REGULATOR_MAX8649 all=m
 REGULATOR_MAX8660 all=m
 REGULATOR_MAX8952 all=m
 REGULATOR_MAX8973 all=m
+REGULATOR_MC13783 all=m
+REGULATOR_MC13892 all=m
 REGULATOR_PCAP all=m
-REGULATOR_LP3971 all=m
-REGULATOR_LP3972 all=m
-REGULATOR_LP8755 all=m
 REGULATOR_PCF50633 all=m
-REGULATOR_AB3100 all=m
-REGULATOR_AB8500 all=y
+REGULATOR_PFUZE100 all=m
 REGULATOR_TPS51632 all=m
 REGULATOR_TPS6105X all=m
 REGULATOR_TPS62360 all=m
@@ -4947,6 +5094,7 @@ RTC_DRV_RS5C372 all=m
 RTC_DRV_ISL1208 all=m
 RTC_DRV_ISL12022 all=m
 RTC_DRV_X1205 all=m
+RTC_DRV_PCF2127 all=m
 RTC_DRV_PCF8523 all=m
 RTC_DRV_PCF8563 all=m
 RTC_DRV_PCF8583 all=m sparc=n
@@ -4998,6 +5146,7 @@ RTC_DRV_GENERIC powerpc=y
 RTC_DRV_PS3 ppc64=m
 RTC_DRV_PCAP all=m
 RTC_DRV_MC13XXX all=m
+RTC_DRV_MOXART all=m
 #- HID Sensor RTC drivers
 RTC_DRV_HID_SENSOR_TIME all=m
 
@@ -5068,13 +5217,14 @@ SCSI_DPT_I2O all=m
 SCSI_ADVANSYS all=m
 SCSI_IN2000 alpha=m i386=m
 SCSI_ARCMSR all=m sparc=n
+#- file drivers/scsi/esas2r/Kconfig goes here
 #- file drivers/scsi/megaraid/Kconfig.megaraid goes here
 #- file drivers/scsi/mpt2sas/Kconfig goes here
 #- file drivers/scsi/mpt3sas/Kconfig goes here
 #- file drivers/scsi/ufs/Kconfig goes here
 SCSI_HPTIOP all=m sparc=n
 SCSI_BUSLOGIC all=m
-SCSI_FLASHPOINT i386=n
+SCSI_FLASHPOINT all=y
 VMWARE_PVSCSI all=m
 HYPERV_STORAGE all=m
 LIBFC all=m
@@ -5219,6 +5369,11 @@ SCSI_DH_HP_SW all=m
 SCSI_DH_EMC all=m
 SCSI_DH_ALUA all=m
 
+#-
+#- *** FILE: drivers/scsi/esas2r/Kconfig ***
+#-
+SCSI_ESAS2R all=m
+
 #-
 #- *** FILE: drivers/scsi/libsas/Kconfig ***
 #-
@@ -5315,6 +5470,7 @@ SPI_BUTTERFLY all=m
 SPI_GPIO all=m
 SPI_LM70_LLP all=m
 SPI_MPC52xx_PSC ppc=m
+SPI_FSL_DSPI all=m
 SPI_OC_TINY all=m
 SPI_PXA2XX all=m
 SPI_SC18IS602 all=m
@@ -5339,11 +5495,6 @@ SSB_SILENT all=n
 SSB_DEBUG all=n
 SSB_DRIVER_GPIO all=y
 
-#-
-#- *** FILE: drivers/ssbi/Kconfig ***
-#-
-SSBI all=n
-
 #-
 #- *** FILE: drivers/staging/Kconfig ***
 #-
@@ -5356,17 +5507,18 @@ STAGING all=y
 #- file drivers/staging/echo/Kconfig goes here
 #- file drivers/staging/comedi/Kconfig goes here
 #- file drivers/staging/olpc_dcon/Kconfig goes here
-#- file drivers/staging/asus_oled/Kconfig goes here
 #- file drivers/staging/panel/Kconfig goes here
 #- file drivers/staging/rtl8187se/Kconfig goes here
 #- file drivers/staging/rtl8192u/Kconfig goes here
 #- file drivers/staging/rtl8192e/Kconfig goes here
 #- file drivers/staging/rtl8712/Kconfig goes here
+#- file drivers/staging/rtl8188eu/Kconfig goes here
 #- file drivers/staging/rts5139/Kconfig goes here
 #- file drivers/staging/frontier/Kconfig goes here
 #- file drivers/staging/phison/Kconfig goes here
 #- file drivers/staging/line6/Kconfig goes here
 #- file drivers/staging/octeon/Kconfig goes here
+#- file drivers/staging/octeon-usb/Kconfig goes here
 #- file drivers/staging/serqt_usb2/Kconfig goes here
 #- file drivers/staging/vt6655/Kconfig goes here
 #- file drivers/staging/vt6656/Kconfig goes here
@@ -5394,18 +5546,21 @@ STAGING all=y
 #- file drivers/staging/android/Kconfig goes here
 #- file drivers/staging/ozwpan/Kconfig goes here
 #- file drivers/staging/gdm72xx/Kconfig goes here
-#- file drivers/staging/csr/Kconfig goes here
-#- file drivers/staging/ti-soc-thermal/Kconfig goes here
+#- file drivers/staging/gdm724x/Kconfig goes here
 #- file drivers/staging/silicom/Kconfig goes here
 #- file drivers/staging/ced1401/Kconfig goes here
 #- file drivers/staging/imx-drm/Kconfig goes here
 #- file drivers/staging/dgrp/Kconfig goes here
 #- file drivers/staging/sb105x/Kconfig goes here
 #- file drivers/staging/fwserial/Kconfig goes here
-#- file drivers/staging/zcache/Kconfig goes here
 #- file drivers/staging/goldfish/Kconfig goes here
 #- file drivers/staging/netlogic/Kconfig goes here
 #- file drivers/staging/dwc2/Kconfig goes here
+#- file drivers/staging/lustre/Kconfig goes here
+#- file drivers/staging/btmtk_usb/Kconfig goes here
+#- file drivers/staging/xillybus/Kconfig goes here
+#- file drivers/staging/dgnc/Kconfig goes here
+#- file drivers/staging/dgap/Kconfig goes here
 
 #-
 #- *** FILE: drivers/staging/android/Kconfig ***
@@ -5413,14 +5568,14 @@ STAGING all=y
 ANDROID all=n
 
 #-
-#- *** FILE: drivers/staging/asus_oled/Kconfig ***
+#- *** FILE: drivers/staging/bcm/Kconfig ***
 #-
-ASUS_OLED all=m
+BCM_WIMAX all=m
 
 #-
-#- *** FILE: drivers/staging/bcm/Kconfig ***
+#- *** FILE: drivers/staging/btmtk_usb/Kconfig ***
 #-
-BCM_WIMAX all=m
+USB_BTMTK all=m
 
 #-
 #- *** FILE: drivers/staging/ced1401/Kconfig ***
@@ -5441,47 +5596,49 @@ COMEDI_TEST all=m
 COMEDI_PARPORT all=m
 COMEDI_SERIAL2002 all=m
 COMEDI_SKEL all=m
-COMEDI_ACL7225B i386=m
-COMEDI_PCL711 i386=m
-COMEDI_PCL724 i386=m
-COMEDI_PCL725 i386=m
-COMEDI_PCL726 i386=m
-COMEDI_PCL730 i386=m
-COMEDI_PCL812 i386=m
-COMEDI_PCL816 i386=m
-COMEDI_PCL818 i386=m
-COMEDI_PCM3724 i386=m
-COMEDI_PCM3730 i386=m
-COMEDI_RTI800 i386=m
-COMEDI_RTI802 i386=m
-COMEDI_DAS16M1 i386=m
-COMEDI_DAS16 i386=m
-COMEDI_DAS800 i386=m
-COMEDI_DAS1800 i386=m
-COMEDI_DAS6402 i386=m
-COMEDI_DT2801 i386=m
-COMEDI_DT2811 i386=m
-COMEDI_DT2814 i386=m
-COMEDI_DT2815 i386=m
-COMEDI_DT2817 i386=m
-COMEDI_DT282X i386=m
-COMEDI_DMM32AT i386=m
-COMEDI_FL512 i386=m
-COMEDI_AIO_AIO12_8 i386=m
-COMEDI_AIO_IIRO_16 i386=m
-COMEDI_C6XDIGIO i386=m
-COMEDI_MPC624 i386=m
-COMEDI_ADQ12B i386=m
-COMEDI_NI_AT_A2150 i386=m
-COMEDI_NI_AT_AO i386=m
-COMEDI_NI_ATMIO i386=m
-COMEDI_NI_ATMIO16D i386=m
-COMEDI_PCMAD i386=m
-COMEDI_PCMDA12 i386=m
-COMEDI_PCMMIO i386=m
-COMEDI_PCMUIO i386=m
-COMEDI_MULTIQ3 i386=m
-COMEDI_POC i386=m
+COMEDI_SSV_DNP all=m
+COMEDI_PCL711 all=m
+COMEDI_PCL724 all=m
+COMEDI_PCL726 all=m
+COMEDI_PCL730 all=m
+COMEDI_PCL812 all=m
+COMEDI_PCL816 all=m
+COMEDI_PCL818 all=m
+COMEDI_PCM3724 all=m
+COMEDI_RTI800 all=m
+COMEDI_RTI802 all=m
+COMEDI_DAS16M1 all=m
+COMEDI_DAS16 all=m
+COMEDI_DAS800 all=m
+COMEDI_DAS1800 all=m
+COMEDI_DAS6402 all=m
+COMEDI_DT2801 all=m
+COMEDI_DT2811 all=m
+COMEDI_DT2814 all=m
+COMEDI_DT2815 all=m
+COMEDI_DT2817 all=m
+COMEDI_DT282X all=m
+COMEDI_DMM32AT all=m
+COMEDI_UNIOXX5 all=m
+COMEDI_FL512 all=m
+COMEDI_AIO_AIO12_8 all=m
+COMEDI_AIO_IIRO_16 all=m
+COMEDI_II_PCI20KC all=m
+COMEDI_C6XDIGIO all=m
+COMEDI_MPC624 all=m
+COMEDI_ADQ12B all=m
+COMEDI_NI_AT_A2150 all=m
+COMEDI_NI_AT_AO all=m
+COMEDI_NI_ATMIO all=m
+COMEDI_NI_ATMIO16D all=m
+COMEDI_NI_LABPC_ISA all=m
+COMEDI_PCMAD all=m
+COMEDI_PCMDA12 all=m
+COMEDI_PCMMIO all=m
+COMEDI_PCMUIO all=m
+COMEDI_MULTIQ3 all=m
+COMEDI_POC all=m
+COMEDI_S526 all=m
 COMEDI_PCI_DRIVERS all=y
 COMEDI_8255_PCI all=m
 COMEDI_ADDI_APCI_035 all=m
@@ -5513,10 +5670,8 @@ COMEDI_CONTEC_PCI_DIO all=m
 COMEDI_DAS08_PCI all=m
 COMEDI_DT3000 all=m
 COMEDI_DYNA_PCI10XX all=m
-COMEDI_UNIOXX5 all=m
 COMEDI_GSC_HPDI all=m
 COMEDI_ICP_MULTI all=m
-COMEDI_II_PCI20KC all=m
 COMEDI_DAQBOARD2000 all=m
 COMEDI_JR3_PCI all=m
 COMEDI_KE_COUNTER all=m
@@ -5535,9 +5690,7 @@ COMEDI_NI_LABPC_PCI all=m
 COMEDI_NI_PCIDIO all=m
 COMEDI_NI_PCIMIO all=m
 COMEDI_RTD520 all=m
-COMEDI_S526 all=m
 COMEDI_S626 all=m
-COMEDI_SSV_DNP all=m
 COMEDI_MITE all=m
 COMEDI_PCMCIA_DRIVERS all=y
 COMEDI_CB_DAS16_CS all=m
@@ -5568,17 +5721,22 @@ TOUCHSCREEN_CLEARPAD_TM1217 all=m
 #-
 CRYSTALHD all=m
 
-#-
-#- *** FILE: drivers/staging/csr/Kconfig ***
-#-
-CSR_WIFI all=m
-
 #-
 #- *** FILE: drivers/staging/cxt1e1/Kconfig ***
 #-
 CXT1E1 all=m
 SBE_PMCC4_NCOMM all=y
 
+#-
+#- *** FILE: drivers/staging/dgap/Kconfig ***
+#-
+DGAP all=m
+
+#-
+#- *** FILE: drivers/staging/dgnc/Kconfig ***
+#-
+DGNC all=m
+
 #-
 #- *** FILE: drivers/staging/dgrp/Kconfig ***
 #-
@@ -5618,6 +5776,11 @@ FT1000_PCMCIA all=m
 #-
 FIREWIRE_SERIAL all=m
 
+#-
+#- *** FILE: drivers/staging/gdm724x/Kconfig ***
+#-
+LTE_GDM724X all=m
+
 #-
 #- *** FILE: drivers/staging/gdm72xx/Kconfig ***
 #-
@@ -5702,8 +5865,6 @@ AD9951 all=m
 #- *** FILE: drivers/staging/iio/gyro/Kconfig ***
 #-
 ADIS16060 all=m
-ADIS16130 all=m
-ADIS16260 all=m
 
 #-
 #- *** FILE: drivers/staging/iio/impedance-analyzer/Kconfig ***
@@ -5746,8 +5907,6 @@ AD2S1210 all=m
 #-
 #- Triggers - standalone
 IIO_PERIODIC_RTC_TRIGGER all=m
-IIO_GPIO_TRIGGER all=m
-IIO_SYSFS_TRIGGER all=m
 
 #-
 #- *** FILE: drivers/staging/keucr/Kconfig ***
@@ -5760,6 +5919,21 @@ USB_ENESTORAGE all=m
 LINE6_USB all=m
 LINE6_USB_IMPULSE_RESPONSE all=n
 
+#-
+#- *** FILE: drivers/staging/lustre/lnet/Kconfig ***
+#-
+LNET_MAX_PAYLOAD all=1048576
+LNET_SELFTEST all=m
+LNET_XPRT_IB all=m
+
+#-
+#- *** FILE: drivers/staging/lustre/lustre/Kconfig ***
+#-
+LUSTRE_FS all=m
+LUSTRE_OBD_MAX_IOCTL_BUFFER all=8192
+LUSTRE_DEBUG_EXPENSIVE_CHECK all=n
+LUSTRE_LLITE_LLOOP all=y
+
 #-
 #- *** FILE: drivers/staging/media/Kconfig ***
 #-
@@ -5769,6 +5943,7 @@ STAGING_MEDIA all=y
 #- file drivers/staging/media/davinci_vpfe/Kconfig goes here
 #- file drivers/staging/media/dt3155v4l/Kconfig goes here
 #- file drivers/staging/media/go7007/Kconfig goes here
+#- file drivers/staging/media/msi3101/Kconfig goes here
 #- file drivers/staging/media/solo6x10/Kconfig goes here
 #- file drivers/staging/media/lirc/Kconfig goes here
 
@@ -5811,6 +5986,11 @@ LIRC_SERIAL_TRANSMITTER all=y
 LIRC_SIR all=m
 LIRC_ZILOG all=m
 
+#-
+#- *** FILE: drivers/staging/media/msi3101/Kconfig ***
+#-
+USB_MSI3101 all=m
+
 #-
 #- *** FILE: drivers/staging/media/solo6x10/Kconfig ***
 #-
@@ -5844,6 +6024,13 @@ ACPI_QUICKSTART all=m
 #-
 R8187SE all=m
 
+#-
+#- *** FILE: drivers/staging/rtl8188eu/Kconfig ***
+#-
+R8188EU all=m
+88EU_AP_MODE all=y
+88EU_P2P all=y
+
 #-
 #- *** FILE: drivers/staging/rtl8192e/Kconfig ***
 #-
@@ -5987,10 +6174,10 @@ PRISM2_USB all=m
 FB_XGI all=m
 
 #-
-#- *** FILE: drivers/staging/zcache/Kconfig ***
+#- *** FILE: drivers/staging/xillybus/Kconfig ***
 #-
-ZCACHE all=y
-ZCACHE_DEBUG all=y
+XILLYBUS all=m
+XILLYBUS_PCIE all=m
 
 #-
 #- *** FILE: drivers/staging/zram/Kconfig ***
@@ -6047,6 +6234,9 @@ THERMAL_GOV_USER_SPACE all=y
 CPU_THERMAL all=y
 THERMAL_EMULATION all=n
 INTEL_POWERCLAMP all=m
+X86_PKG_TEMP_THERMAL all=m
+#- file drivers/thermal/ti-soc-thermal/Kconfig goes here
+#- file drivers/thermal/samsung/Kconfig goes here
 
 #-
 #- *** FILE: drivers/tty/Kconfig ***
@@ -6159,25 +6349,31 @@ SERIAL_ARC all=m
 SERIAL_ARC_NR_PORTS all=1
 SERIAL_RP2 all=m
 SERIAL_RP2_NR_UARTS all=32
+SERIAL_FSL_LPUART all=m
+SERIAL_ST_ASC all=m
 
 #-
 #- *** FILE: drivers/uio/Kconfig ***
 #-
 UIO all=m
 UIO_CIF all=m
-UIO_PDRV all=m
 UIO_PDRV_GENIRQ all=m
 UIO_DMEM_GENIRQ all=m
 UIO_AEC all=m
 UIO_SERCOS3 all=m
 UIO_PCI_GENERIC all=m
 UIO_NETX all=m
+UIO_MF624 all=m
 
 #-
 #- *** FILE: drivers/usb/Kconfig ***
 #-
 USB_ARCH_HAS_OHCI all=y
+USB_OHCI_BIG_ENDIAN_DESC all=n ppc=y ppc64=y
+USB_OHCI_BIG_ENDIAN_MMIO all=n ppc=y ppc64=y
+USB_OHCI_LITTLE_ENDIAN all=y
 USB_ARCH_HAS_EHCI all=y
+USB_EHCI_BIG_ENDIAN_MMIO all=n ppc64=y
 USB_SUPPORT all=y sparc=n
 USB_ARCH_HAS_HCD all=y
 USB all=m sparc=n
@@ -6245,6 +6441,11 @@ USB_DWC3 all=m
 USB_DWC3_HOST all=n
 USB_DWC3_GADGET all=n
 USB_DWC3_DUAL_ROLE all=y
+#- Platform Glue Driver Support
+USB_DWC3_OMAP all=m
+USB_DWC3_EXYNOS all=m
+USB_DWC3_PCI all=m
+#- Debugging features
 USB_DWC3_DEBUG all=n
 
 #-
@@ -6256,12 +6457,12 @@ USB_GADGET_DEBUG_FILES all=n
 USB_GADGET_DEBUG_FS all=n
 USB_GADGET_VBUS_DRAW all=2
 USB_GADGET_STORAGE_NUM_BUFFERS all=2
+USB_FOTG210_UDC all=m
 USB_R8A66597 all=m
 USB_RENESAS_USBHS_UDC all=m
 USB_PXA27X all=n
 USB_MV_UDC all=m
 USB_MV_U3D all=m
-USB_GADGET_MUSB_HDRC all=n
 USB_M66592 all=m
 USB_AMD5536UDC all=m
 USB_NET2272 all=m
@@ -6270,6 +6471,16 @@ USB_NET2280 all=m
 USB_GOKU all=m
 USB_EG20T all=m
 USB_DUMMY_HCD all=m
+USB_CONFIGFS all=m
+USB_CONFIGFS_SERIAL all=y
+USB_CONFIGFS_ACM all=y
+USB_CONFIGFS_OBEX all=y
+USB_CONFIGFS_NCM all=y
+USB_CONFIGFS_ECM all=y
+USB_CONFIGFS_ECM_SUBSET all=y
+USB_CONFIGFS_RNDIS all=y
+USB_CONFIGFS_EEM all=y
+USB_CONFIGFS_PHONET all=y
 USB_ZERO all=m
 USB_ZERO_HNPTEST all=n
 USB_AUDIO all=m
@@ -6306,11 +6517,9 @@ USB_G_WEBCAM all=m
 #- USB Host Controller Drivers
 USB_C67X00_HCD all=m
 USB_XHCI_HCD all=m
-USB_XHCI_HCD_DEBUGGING all=n
 USB_EHCI_HCD all=m
 USB_EHCI_ROOT_HUB_TT all=y sparc64=n
 USB_EHCI_TT_NEWSCHED all=y
-USB_EHCI_BIG_ENDIAN_MMIO all=n ppc64=y
 USB_EHCI_FSL ppc=y
 USB_EHCI_HCD_PPC_OF ppc=y ppc64=y
 USB_EHCI_MV all=y
@@ -6318,16 +6527,15 @@ USB_OXU210HP_HCD all=m
 USB_ISP116X_HCD all=m
 USB_ISP1760_HCD all=m
 USB_ISP1362_HCD all=m
+USB_FUSBH200_HCD all=m
+USB_FOTG210_HCD all=m
 USB_OHCI_HCD all=m
 USB_OHCI_HCD_PPC_OF_BE ppc=y ppc64=y
 USB_OHCI_HCD_PPC_OF_LE ppc=y ppc64=n
 USB_OHCI_HCD_PPC_OF ppc=y ppc64=y
-USB_OHCI_HCD_PCI ppc=y ppc64=y
+USB_OHCI_HCD_PCI all=m
 USB_OHCI_HCD_SSB all=y
 USB_OHCI_HCD_PLATFORM all=y
-USB_OHCI_BIG_ENDIAN_DESC all=n ppc=y ppc64=y
-USB_OHCI_BIG_ENDIAN_MMIO all=n ppc=y ppc64=y
-USB_OHCI_LITTLE_ENDIAN all=y
 USB_UHCI_HCD all=m
 USB_U132_HCD all=m
 USB_SL811_HCD all=m
@@ -6338,6 +6546,7 @@ USB_RENESAS_USBHS_HCD all=m
 USB_WHCI_HCD all=m
 USB_HWA_HCD all=m
 USB_HCD_BCMA all=m
+USB_HCD_TEST_MODE all=n
 
 #-
 #- *** FILE: drivers/usb/image/Kconfig ***
@@ -6368,6 +6577,7 @@ USB_LD all=m
 USB_TRANCEVIBRATOR all=m
 USB_IOWARRIOR all=m
 USB_TEST all=m
+USB_EHSET_TEST_FIXTURE all=m
 USB_ISIGHTFW all=m
 USB_YUREX all=m
 USB_EZUSB_FX2 all=m
@@ -6398,6 +6608,7 @@ NOP_USB_XCEIV all=m
 OMAP_CONTROL_USB all=m
 OMAP_USB2 all=m
 OMAP_USB3 all=m
+AM335X_PHY_USB all=m
 SAMSUNG_USBPHY all=m
 SAMSUNG_USB2PHY all=m
 SAMSUNG_USB3PHY all=m
@@ -6417,6 +6628,7 @@ USB_RENESAS_USBHS all=m
 #-
 USB_SERIAL all=m
 USB_SERIAL_GENERIC all=y
+USB_SERIAL_SIMPLE all=m
 USB_SERIAL_AIRCABLE all=m
 USB_SERIAL_ARK3116 all=m
 USB_SERIAL_BELKIN all=m
@@ -6427,7 +6639,6 @@ USB_SERIAL_CP210X all=m
 USB_SERIAL_CYPRESS_M8 all=m
 USB_SERIAL_EMPEG all=m
 USB_SERIAL_FTDI_SIO all=m
-USB_SERIAL_FUNSOFT all=m
 USB_SERIAL_VISOR all=m
 USB_SERIAL_IPAQ all=m
 USB_SERIAL_IR all=m
@@ -6458,17 +6669,14 @@ USB_SERIAL_METRO all=m
 USB_SERIAL_MOS7720 all=m
 USB_SERIAL_MOS7715_PARPORT all=y
 USB_SERIAL_MOS7840 all=m
-USB_SERIAL_MOTOROLA all=m
 USB_SERIAL_NAVMAN all=m
 USB_SERIAL_PL2303 all=m
 USB_SERIAL_OTI6858 all=m
 USB_SERIAL_QCAUX all=m
 USB_SERIAL_QUALCOMM all=m
 USB_SERIAL_SPCP8X5 all=m
-USB_SERIAL_HP4X all=m
 USB_SERIAL_SAFE all=m
 USB_SERIAL_SAFE_PADDED all=y
-USB_SERIAL_SIEMENS_MPI all=m
 USB_SERIAL_SIERRAWIRELESS all=m
 USB_SERIAL_SYMBOL all=m
 USB_SERIAL_TI all=m
@@ -6477,9 +6685,7 @@ USB_SERIAL_XIRCOM all=m
 USB_SERIAL_OPTION all=m
 USB_SERIAL_OMNINET all=m
 USB_SERIAL_OPTICON all=m
-USB_SERIAL_VIVOPAY_SERIAL all=m
 USB_SERIAL_XSENS_MT all=m
-USB_SERIAL_ZIO all=m
 USB_SERIAL_WISHBONE all=m
 USB_SERIAL_ZTE all=m
 USB_SERIAL_SSU100 all=m
@@ -6677,6 +6883,7 @@ FB_AUO_K190X all=m
 FB_AUO_K1900 all=m
 FB_AUO_K1901 all=m
 FB_HYPERV all=m
+FB_SIMPLE all=n
 #- file drivers/video/omap/Kconfig goes here
 #- file drivers/video/omap2/Kconfig goes here
 #- file drivers/video/exynos/Kconfig goes here
@@ -6721,6 +6928,9 @@ BACKLIGHT_LM3639 all=m
 BACKLIGHT_LP855X all=m
 BACKLIGHT_OT200 all=m
 BACKLIGHT_TPS65217 all=m
+BACKLIGHT_GPIO all=m
+BACKLIGHT_LV5207LP all=m
+BACKLIGHT_BD6107 all=m
 
 #-
 #- *** FILE: drivers/video/console/Kconfig ***
@@ -6732,17 +6942,6 @@ MDA_CONSOLE alpha=m i386=m
 DUMMY_CONSOLE all=y
 FRAMEBUFFER_CONSOLE all=y
 FRAMEBUFFER_CONSOLE_ROTATION all=y
-FONTS all=y alpha=n i386=n ia64=n x86_64=n
-FONT_8x8 all=y
-FONT_8x16 all=y
-FONT_6x11 all=y
-FONT_7x14 all=n
-FONT_PEARL_8x8 all=n
-FONT_ACORN_8x8 all=n
-FONT_MINI_4x6 ppc=y ppc64=y
-FONT_SUN8x16 ppc=n ppc64=n sparc=y sparc64=y
-FONT_SUN12x22 ppc=n ppc64=n sparc=y sparc64=y
-FONT_10x18 all=n
 
 #-
 #- *** FILE: drivers/video/exynos/Kconfig ***
@@ -6871,6 +7070,7 @@ ITCO_VENDOR_SUPPORT all=y
 IT8712F_WDT all=m
 IT87_WDT all=m
 HP_WATCHDOG all=m
+KEMPLD_WDT all=m
 HPWDT_NMI_DECODING all=y
 SC1200_WDT i386=m x86_64=m
 SCx200_WDT i386=m
@@ -6891,6 +7091,7 @@ W83977F_WDT i386=m x86_64=m
 MACHZ_WDT i386=m x86_64=m
 SBC_EPX_C3_WATCHDOG i386=m x86_64=m
 MPC5200_WDT ppc=m
+MEN_A21_WDT all=m
 WATCHDOG_RTAS ppc=m ppc64=m
 WATCHDOG_CP1XXX sparc64=m
 WATCHDOG_RIO sparc64=m
@@ -6929,6 +7130,7 @@ XEN_MCE_LOG all=y
 9P_FS all=m
 9P_FSCACHE all=y
 9P_FS_POSIX_ACL all=y
+9P_FS_SECURITY all=y
 
 #-
 #- *** FILE: fs/Kconfig ***
@@ -7067,6 +7269,7 @@ BTRFS_FS_POSIX_ACL all=y
 BTRFS_FS_CHECK_INTEGRITY all=n
 BTRFS_FS_RUN_SANITY_TESTS all=y
 BTRFS_DEBUG all=n
+BTRFS_ASSERT all=n
 
 #-
 #- *** FILE: fs/cachefiles/Kconfig ***
@@ -7079,6 +7282,7 @@ CACHEFILES_HISTOGRAM all=n
 #- *** FILE: fs/ceph/Kconfig ***
 #-
 CEPH_FS all=m
+CEPH_FSCACHE all=y
 
 #-
 #- *** FILE: fs/cifs/Kconfig ***
@@ -7172,6 +7376,7 @@ F2FS_FS all=m
 F2FS_STAT_FS all=y
 F2FS_FS_XATTR all=y
 F2FS_FS_POSIX_ACL all=y
+F2FS_FS_SECURITY all=y
 
 #-
 #- *** FILE: fs/fat/Kconfig ***
@@ -7217,6 +7422,7 @@ HFS_FS all=m
 #- *** FILE: fs/hfsplus/Kconfig ***
 #-
 HFSPLUS_FS all=m
+HFSPLUS_FS_POSIX_ACL all=y
 
 #-
 #- *** FILE: fs/hpfs/Kconfig ***
@@ -7316,6 +7522,7 @@ NFSD_V2_ACL all=y
 NFSD_V3 all=y
 NFSD_V3_ACL all=y
 NFSD_V4 all=y
+NFSD_V4_SECURITY_LABEL all=y
 NFSD_FAULT_INJECTION all=n
 
 #-
@@ -7526,6 +7733,7 @@ XFS_DEBUG all=n
 DEFCONFIG_LIST all="/lib/modules/$UNAME_RELEASE/.config"
 INIT_ENV_ARG_LIMIT all=32
 CROSS_COMPILE all=""
+COMPILE_TEST all=n
 LOCALVERSION_AUTO all=y
 HAVE_KERNEL_GZIP all=y
 HAVE_KERNEL_BZIP2 all=y
@@ -7536,6 +7744,7 @@ KERNEL_BZIP2 all=n
 KERNEL_LZMA all=n
 KERNEL_XZ all=y
 KERNEL_LZO all=n
+KERNEL_LZ4 all=n
 DEFAULT_HOSTNAME all="(none)"
 SWAP all=y
 SYSVIPC all=y
@@ -7605,7 +7814,6 @@ BLK_DEV_INITRD all=y
 CC_OPTIMIZE_FOR_SIZE all=n
 SYSCTL all=y
 ANON_INODES all=y
-HOTPLUG all=y
 EXPERT all=n
 UID16 all=y
 KALLSYMS all=y
@@ -7631,6 +7839,7 @@ COMPAT_BRK all=n
 SLAB all=n
 SLUB all=y
 SLOB all=n
+SLUB_CPU_PARTIAL all=y
 PROFILING all=y
 #- file arch/Kconfig goes here
 SLABINFO all=y
@@ -7694,6 +7903,7 @@ PM_RUNTIME all=y
 PM all=y
 PM_DEBUG all=n
 APM_EMULATION ppc=m
+WQ_POWER_EFFICIENT_DEFAULT all=n
 
 #-
 #- *** FILE: kernel/time/Kconfig ***
@@ -7768,16 +7978,20 @@ CHECK_SIGNATURE all=y
 CPU_RMAP all=y
 CORDIC all=m
 DDR all=y
+#- file lib/fonts/Kconfig goes here
 
 #-
 #- *** FILE: lib/Kconfig.debug ***
 #-
 PRINTK_TIME all=y
 DEFAULT_MESSAGE_LOGLEVEL all=4
+BOOT_PRINTK_DELAY all=n
+DYNAMIC_DEBUG all=n
+DEBUG_INFO all=y
+DEBUG_INFO_REDUCED all=n
 ENABLE_WARN_DEPRECATED all=y
 ENABLE_MUST_CHECK all=y
 FRAME_WARN all=2048
-MAGIC_SYSRQ all=y
 STRIP_ASM_SYMS all=y
 READABLE_ASM all=n
 UNUSED_SYMBOLS all=y
@@ -7785,80 +7999,79 @@ UNUSED_SYMBOLS all=y
 DEBUG_FS all=y
 HEADERS_CHECK all=y
 DEBUG_SECTION_MISMATCH all=n
+FRAME_POINTER i386=y x86_64=y
+DEBUG_FORCE_WEAK_PER_CPU all=n
+MAGIC_SYSRQ all=y
 DEBUG_KERNEL all=y
+#- file mm/Kconfig.debug goes here
+DEBUG_OBJECTS all=n
+DEBUG_SLAB all=n
+SLUB_DEBUG_ON all=n
+SLUB_STATS all=n
+DEBUG_KMEMLEAK all=n
+DEBUG_VM all=n
+DEBUG_VIRTUAL all=n
+MEMORY_NOTIFIER_ERROR_INJECT all=m
+DEBUG_HIGHMEM i386=n sparc=n
+#- file lib/Kconfig.kmemcheck goes here
 DEBUG_SHIRQ all=n
 LOCKUP_DETECTOR all=y
 BOOTPARAM_HARDLOCKUP_PANIC all=n
 BOOTPARAM_HARDLOCKUP_PANIC_VALUE all=0
 BOOTPARAM_SOFTLOCKUP_PANIC all=n
-PANIC_ON_OOPS all=n
 DETECT_HUNG_TASK all=y
 DEFAULT_HUNG_TASK_TIMEOUT all=120
 BOOTPARAM_HUNG_TASK_PANIC all=n
+PANIC_ON_OOPS all=n
 SCHED_DEBUG all=n
 SCHEDSTATS all=n
 TIMER_STATS all=y
-DEBUG_OBJECTS all=n
-DEBUG_SLAB all=n
-SLUB_DEBUG_ON all=n
-SLUB_STATS all=n
-DEBUG_KMEMLEAK all=n
 DEBUG_RT_MUTEXES all=n
 RT_MUTEX_TESTER all=n
 DEBUG_SPINLOCK all=n
 DEBUG_MUTEXES all=n
+DEBUG_WW_MUTEX_SLOWPATH all=n
 DEBUG_LOCK_ALLOC all=n
 PROVE_LOCKING all=n
 LOCK_STAT all=n
 DEBUG_ATOMIC_SLEEP all=n
 DEBUG_LOCKING_API_SELFTESTS all=n
 DEBUG_KOBJECT all=n
-DEBUG_HIGHMEM i386=n sparc=n
+DEBUG_KOBJECT_RELEASE all=n
 DEBUG_BUGVERBOSE all=y
-DEBUG_INFO all=y
-DEBUG_INFO_REDUCED all=n
-DEBUG_VM all=n
-DEBUG_VIRTUAL all=n
 DEBUG_WRITECOUNT all=n
 DEBUG_LIST all=n
-TEST_LIST_SORT all=n
 DEBUG_SG all=n
 DEBUG_NOTIFIERS all=n
 DEBUG_CREDENTIALS all=n
-FRAME_POINTER i386=y x86_64=y
-BOOT_PRINTK_DELAY all=n
 SPARSE_RCU_POINTER all=n
 RCU_TORTURE_TEST all=m
 RCU_CPU_STALL_TIMEOUT all=60
 RCU_CPU_STALL_INFO all=n
 RCU_TRACE all=n
-KPROBES_SANITY_TEST all=n
-BACKTRACE_SELF_TEST all=m
 DEBUG_BLOCK_EXT_DEVT all=n
-DEBUG_FORCE_WEAK_PER_CPU all=n
-LKDTM all=m
 NOTIFIER_ERROR_INJECTION all=m
 CPU_NOTIFIER_ERROR_INJECT all=m
 PM_NOTIFIER_ERROR_INJECT all=m
-MEMORY_NOTIFIER_ERROR_INJECT all=m
 FAULT_INJECTION all=n
 LATENCYTOP all=n
-#- file mm/Kconfig.debug goes here
 #- file kernel/trace/Kconfig goes here
+LKDTM all=m
+TEST_LIST_SORT all=n
+KPROBES_SANITY_TEST all=n
+BACKTRACE_SELF_TEST all=m
 RBTREE_TEST all=m
 INTERVAL_TREE_TEST all=m
+ATOMIC64_SELFTEST all=n
+ASYNC_RAID6_TEST all=m
+TEST_STRING_HELPERS all=m
+TEST_KSTRTOX all=m
 PROVIDE_OHCI1394_DMA_INIT all=n
 FIREWIRE_OHCI_REMOTE_DMA all=n
 BUILD_DOCSRC all=n
-DYNAMIC_DEBUG all=n
 DMA_API_DEBUG all=n
-ATOMIC64_SELFTEST all=n
-ASYNC_RAID6_TEST all=m
 #- file samples/Kconfig goes here
 #- file lib/Kconfig.kgdb goes here
-#- file lib/Kconfig.kmemcheck goes here
-TEST_STRING_HELPERS all=m
-TEST_KSTRTOX all=m
 
 #-
 #- *** FILE: lib/Kconfig.kgdb ***
@@ -7877,6 +8090,21 @@ KDB_CONTINUE_CATASTROPHIC all=0
 #-
 KMEMCHECK all=n
 
+#-
+#- *** FILE: lib/fonts/Kconfig ***
+#-
+FONTS all=y alpha=n i386=n ia64=n x86_64=n
+FONT_8x8 all=y
+FONT_8x16 all=y
+FONT_6x11 all=y
+FONT_7x14 all=n
+FONT_PEARL_8x8 all=n
+FONT_ACORN_8x8 all=n
+FONT_MINI_4x6 ppc=y ppc64=y
+FONT_SUN8x16 ppc=n ppc64=n sparc=y sparc64=y
+FONT_SUN12x22 ppc=n ppc64=n sparc=y sparc64=y
+FONT_10x18 all=n
+
 #-
 #- *** FILE: lib/xz/Kconfig ***
 #-
@@ -7915,6 +8143,9 @@ TRANSPARENT_HUGEPAGE_MADVISE all=n
 CROSS_MEMORY_ATTACH all=y
 CLEANCACHE all=y
 FRONTSWAP all=y
+CMA all=y
+CMA_DEBUG all=n
+ZSWAP all=y
 
 #-
 #- *** FILE: mm/Kconfig.debug ***
@@ -7986,6 +8217,7 @@ BRIDGE_NETFILTER all=y
 #- file net/openvswitch/Kconfig goes here
 #- file net/vmw_vsock/Kconfig goes here
 #- file net/netlink/Kconfig goes here
+#- file net/mpls/Kconfig goes here
 RFS_ACCEL all=y
 NETPRIO_CGROUP all=m
 BPF_JIT all=y
@@ -8201,7 +8433,6 @@ IP_MROUTE all=y
 IP_MROUTE_MULTIPLE_TABLES all=y
 IP_PIMSM_V1 all=y
 IP_PIMSM_V2 all=y
-ARPD all=n
 SYN_COOKIES all=y
 NET_IPVTI all=m
 INET_AH all=m
@@ -8250,6 +8481,7 @@ IP_NF_MATCH_RPFILTER all=m
 IP_NF_MATCH_TTL all=m
 IP_NF_FILTER all=m
 IP_NF_TARGET_REJECT all=m
+IP_NF_TARGET_SYNPROXY all=m
 IP_NF_TARGET_ULOG all=m
 NF_NAT_IPV4 all=m
 IP_NF_TARGET_MASQUERADE all=m
@@ -8311,6 +8543,7 @@ IP6_NF_MATCH_RT all=m
 IP6_NF_TARGET_HL all=m
 IP6_NF_FILTER all=m
 IP6_NF_TARGET_REJECT all=m
+IP6_NF_TARGET_SYNPROXY all=m
 IP6_NF_MANGLE all=m
 IP6_NF_RAW all=m
 IP6_NF_SECURITY all=m
@@ -8396,6 +8629,11 @@ MAC80211_DEBUG_MENU all=n
 #-
 MAC802154 all=m
 
+#-
+#- *** FILE: net/mpls/Kconfig ***
+#-
+NET_MPLS_GSO all=m
+
 #-
 #- *** FILE: net/netfilter/Kconfig ***
 #-
@@ -8429,7 +8667,6 @@ NF_CT_NETLINK_TIMEOUT all=m
 NF_CT_NETLINK_HELPER all=m
 NETFILTER_NETLINK_QUEUE_CT all=y
 NF_NAT all=m
-NETFILTER_TPROXY all=m
 NETFILTER_XTABLES all=m
 #- Xtables combined modules
 NETFILTER_XT_MARK all=m
@@ -8580,11 +8817,14 @@ NFC_SHDLC all=y
 #- *** FILE: net/nfc/nci/Kconfig ***
 #-
 NFC_NCI all=m
+NFC_NCI_SPI all=y
 
 #-
 #- *** FILE: net/openvswitch/Kconfig ***
 #-
 OPENVSWITCH all=m
+OPENVSWITCH_GRE all=y
+OPENVSWITCH_VXLAN all=y
 
 #-
 #- *** FILE: net/packet/Kconfig ***
@@ -8645,6 +8885,7 @@ NET_SCH_CHOKE all=m
 NET_SCH_QFQ all=m
 NET_SCH_CODEL all=m
 NET_SCH_FQ_CODEL all=m
+NET_SCH_FQ all=m
 NET_SCH_INGRESS all=m
 NET_SCH_PLUG all=m
 #- Classification
@@ -8688,7 +8929,6 @@ NET_SCH_FIFO all=y
 #-
 IP_SCTP all=m
 NET_SCTPPROBE all=m
-SCTP_DBG_MSG all=n
 SCTP_DBG_OBJCNT all=n
 SCTP_DEFAULT_COOKIE_HMAC_MD5 all=y
 SCTP_DEFAULT_COOKIE_HMAC_SHA1 all=n
@@ -8795,7 +9035,7 @@ DEFAULT_SECURITY all=""
 #-
 SECURITY_APPARMOR=y
 SECURITY_APPARMOR_BOOTPARAM_VALUE=1
-SECURITY_APPARMOR_COMPAT_24=y
+SECURITY_APPARMOR_HASH all=y
 
 #-
 #- *** FILE: security/integrity/ima/Kconfig ***
@@ -8916,6 +9156,7 @@ SND_SEQ_HRTIMER_DEFAULT all=y
 SND_RTCTIMER alpha=m i386=m ia64=m x86_64=m
 SND_SEQ_RTCTIMER_DEFAULT alpha=y i386=y ia64=y x86_64=y
 SND_DYNAMIC_MINORS all=y
+SND_MAX_CARDS all=32
 SND_SUPPORT_OLD_API all=y
 SND_VERBOSE_PROCFS all=y
 SND_VERBOSE_PRINTK all=n
@@ -9025,7 +9266,6 @@ SOUND_KAHLUA all=m
 #-
 #- *** FILE: sound/pci/Kconfig ***
 #-
-SND_TEA575X all=m
 SND_PCI all=y
 SND_AD1889 all=m
 SND_ALS300 all=m
@@ -9166,6 +9406,7 @@ SND_SOC all=m
 #- file sound/soc/samsung/Kconfig goes here
 #- file sound/soc/s6000/Kconfig goes here
 #- file sound/soc/sh/Kconfig goes here
+#- file sound/soc/spear/Kconfig goes here
 #- file sound/soc/tegra/Kconfig goes here
 #- file sound/soc/txx9/Kconfig goes here
 #- file sound/soc/ux500/Kconfig goes here
@@ -9183,7 +9424,6 @@ SND_ATMEL_SOC all=m
 SND_SOC_ALL_CODECS all=m
 SND_SOC_AK4641 all=m
 SND_SOC_CS4271 all=m
-SND_SOC_DFBMCS320 all=m
 SND_SOC_MAX98095 all=m
 SND_SOC_MAX9850 all=m
 SND_SOC_SGTL5000 all=m
@@ -9235,6 +9475,7 @@ SND_USB_CAIAQ all=m
 SND_USB_CAIAQ_INPUT all=y sparc64=n
 SND_USB_US122L all=m
 SND_USB_6FIRE all=m
+SND_USB_HIFACE all=m
 
 #-
 #- *** FILE: usr/Kconfig ***
@@ -9257,6 +9498,7 @@ INITRAMFS_COMPRESSION_LZMA all=n
 ABYSS all=m sparc=
 AC3200 alpha=m i386=m
 ACPI_ASUS i386=m x86_64=m
+ACPI_PROC_EVENT all=y
 AD2S120X all=m
 AD2S1210_GPIO_INPUT all=n
 AD2S1210_GPIO_NONE all=y
@@ -9267,8 +9509,12 @@ ADT7310 all=m
 ADT7410 all=m
 ADT75 all=m
 APRICOT alpha=m i386=m
+ARCH_SUPPORTS_MSI ppc=y sparc=n sparc64=y
+ARPD all=n
+ASUS_OLED all=m
 AT1700 alpha=m i386=m
 ATH6K_LEGACY all=n
+B43_BCMA_EXTRA all=y
 BACKLIGHT_PROGEAR i386=m x86_64=m
 BATTERY_BQ20Z75 all=m
 BLK_DEV_UB all=n
@@ -9281,6 +9527,7 @@ CGROUP_MEM_RES_CTLR all=y
 CGROUP_MEM_RES_CTLR_KMEM all=y
 CGROUP_MEM_RES_CTLR_SWAP all=y
 CGROUP_MEM_RES_CTLR_SWAP_ENABLED all=n
+COMEDI_ACL7225B i386=m
 COMEDI_ADDI_APCI_2016 all=m
 COMEDI_ADDI_APCI_3001 all=m
 COMEDI_ADL_PCI7230 all=m
@@ -9291,6 +9538,7 @@ COMEDI_NI_COMMON all=m
 COMPUTONE all=m
 CRYPTO_LZF all=m
 CS5535_GPIO i386=m
+CSR_WIFI all=m
 CYCLADES_SYNC all=m
 CYCLOMX_X25 all=y
 DE600 all=m
@@ -9334,6 +9582,7 @@ EXT4_FS_XATTR all=y
 FAIR_SHARE all=y
 GPIO_BASIC_MMIO all=m
 GPIO_BASIC_MMIO_CORE all=m
+HID_PS3REMOTE all=m
 HID_QUANTA all=m
 HID_ROCCAT_ARVO all=m
 HID_ROCCAT_COMMON all=m
@@ -9344,6 +9593,8 @@ HID_ROCCAT_KOVAPLUS all=m
 HID_ROCCAT_PYRA all=m
 HID_SUPPORT all=y
 HID_WACOM_POWER_SUPPLY all=y
+HID_WIIMOTE_EXT all=y
+HOTPLUG all=y
 HOTPLUG_PCI_FAKE all=m
 HPLAN alpha=m i386=m
 HPLAN_PLUS alpha=m i386=m
@@ -9351,6 +9602,7 @@ HVC_ISERIES ppc64=n
 HYPERV_BLOCK all=m
 HYPERV_MOUSE all=m
 I2C_DESIGNWARE powerpc=m
+I2C_INTEL_MID all=m
 IBMLANA i386=m
 IBMLS i386=m ppc=n
 IBMMCA_SCSI_DEV_RESET i386=n
@@ -9365,6 +9617,7 @@ IBM_NEW_EMAC_RX_COPY_THRESHOLD ppc64=256
 IBM_NEW_EMAC_RX_SKB_HEADROOM ppc64=0
 IBM_NEW_EMAC_TXB ppc64=64
 IGB_PTP all=y
+IIO_GPIO_TRIGGER all=m
 IIO_RING_BUFFER all=y
 IIO_ST_HWMON all=m
 IIO_SW_RING all=m
@@ -9383,6 +9636,7 @@ IWLWIFI_EXPERIMENTAL_MFP all=n
 IWLWIFI_LEGACY all=m
 IWLWIFI_LEGACY_DEBUG all=n
 IWLWIFI_LEGACY_DEVICE_TRACING all=n
+IWLWIFI_P2P all=y
 IWL_P2P all=n
 IWM all=m
 IWMC3200TOP all=m
@@ -9396,6 +9650,8 @@ LEDS_GPIO_OF powerpc=y sparc=y
 LEDS_GPIO_PLATFORM all=y
 LEDS_LM3556 all=m
 LEDS_NET5501 all=m
+LEDS_PCA9633 all=m
+LEDS_RENESAS_TPU all=y
 LINE6_USB_DEBUG all=n
 LINE6_USB_DUMP_CTRL all=n
 LINE6_USB_DUMP_MIDI all=n
@@ -9416,6 +9672,7 @@ MEDIA_TUNER_CUSTOMISE all=n
 MFD_SUPPORT all=y
 MISC_DEVICES all=y
 MMC_SDHCI_OF powerpc=m
+MTD_ALAUDA all=m
 MTD_CHAR all=m
 MTD_DEBUG all=n
 MTD_DILNETPC i386=m x86_64=m
@@ -9423,6 +9680,10 @@ MTD_DILNETPC_BOOTSIZE i386=0x80000 x86_64=0x80000
 MTD_DOC2000 all=m
 MTD_DOC2001 all=m
 MTD_DOC2001PLUS all=m
+MTD_DOCECC all=m
+MTD_DOCPROBE all=m
+MTD_DOCPROBE_ADDRESS all=0x0
+MTD_DOCPROBE_ADVANCED all=n
 MTD_NAND_MUSEUM_IDS all=y sparc=n
 MTD_NAND_VERIFY_WRITE all=y
 MTD_ONENAND_SIM all=m
@@ -9434,6 +9695,7 @@ NE2_MCA i386=m
 NE3210 alpha=m i386=m
 NETDEV_1000 all=y
 NETDEV_10000 all=y
+NETFILTER_TPROXY all=m
 NET_ETHERNET all=y
 NET_ISA alpha=y i386=y
 NET_PCI all=y
@@ -9464,6 +9726,7 @@ POHMELFS_DEBUG all=n
 PROTEON alpha=m i386=m
 R8712_AP all=y
 RAMOOPS all=m
+RAPIDIO_TSI500 all=y
 RAR_REGISTER all=y
 REGULATOR_BQ24022 all=m
 RIO all=m
@@ -9475,9 +9738,11 @@ SCSI_ARCMSR_AER all=y
 SCSI_FD_MCS i386=m
 SCSI_IBMMCA i386=m
 SCSI_WAIT_SCAN all=m
+SCTP_DBG_MSG all=n
 SCTP_HMAC_MD5 all=y
 SCTP_HMAC_NONE all=n
 SCTP_HMAC_SHA1 all=n
+SECURITY_APPARMOR_COMPAT_24=y
 SEEQ8005 all=m
 SENSORS_AK8975 all=m
 SERIAL_8250_MCA i386=m
@@ -9492,13 +9757,17 @@ SND_HDA_POWER_SAVE all=y
 SND_INTELMID all=n
 SND_INTEL_SST all=m
 SND_SOC_CACHE_LZO all=y
+SND_SOC_DFBMCS320 all=m
 SND_SOC_TVL320AIC32X4 all=m
 SND_SOC_WM8915 all=m
+SND_TEA575X all=m
 SPECIALIX all=m
 SPECTRA all=m
 SPECTRA_EMU all=n
 SPECTRA_MRST_HW all=n
 SPECTRA_MTD all=y
+SSBI all=n
+STALDRV all=y
 STALLION all=m
 STMMAC_CHAINED all=n
 STMMAC_DUAL_MAC all=y
@@ -9514,6 +9783,7 @@ TMSPCI all=m sparc=
 TR all=y sparc=n
 UBIFS_FS_DEBUG all=n
 UBIFS_FS_XATTR all=y
+UIO_PDRV all=m
 ULTRA32 alpha=m i386=m
 ULTRAMCA i386=m
 USB_CI13XXX_PCI all=m
@@ -9536,6 +9806,7 @@ USB_GADGET_FUSB300 all=n
 USB_GADGET_GOKU all=n
 USB_GADGET_LANGWELL all=n
 USB_GADGET_M66592 all=n
+USB_GADGET_MUSB_HDRC all=n
 USB_GADGET_NET2280 all=n
 USB_GADGET_OMAP all=n
 USB_GADGET_PXA_U2O all=n
@@ -9545,8 +9816,15 @@ USB_GADGET_SELECTED all=y
 USB_LANGWELL_OTG all=m
 USB_LIBUSUAL all=y
 USB_OHCI_HCD_PPC_SOC ppc=y
+USB_SERIAL_FUNSOFT all=m
+USB_SERIAL_HP4X all=m
+USB_SERIAL_MOTOROLA all=m
 USB_SERIAL_QUATECH_USB2 all=m
+USB_SERIAL_SIEMENS_MPI all=m
+USB_SERIAL_VIVOPAY_SERIAL all=m
+USB_SERIAL_ZIO all=m
 USB_SUSPEND all=y
+USB_XHCI_HCD_DEBUGGING all=n
 USER_SPACE all=y
 V4L_ISA_PARPORT_DRIVERS all=y
 V4L_PCI_DRIVERS all=y
@@ -9576,5 +9854,7 @@ WL12XX_SPI all=m
 WM5102 all=y
 XEN_PLATFORM_PCI all=m
 XVMALLOC all=y 
+ZCACHE all=y
 ZCACHE2 all=y
+ZCACHE_DEBUG all=y
 ZNET all=m
index 4a876161dc3734bc663664a78b544ff9f8049604..012fb1535773c72eecf22023118c50bb2de324a0 100644 (file)
@@ -32,7 +32,7 @@ new file mode 100644
 index 0000000..8882bda
 --- /dev/null
 +++ b/drivers/gpu/misc/virtio-gl.c
-@@ -0,0 +1,312 @@
+@@ -0,0 +1,315 @@
 +/*
 + * Copyright (C) 2010 Intel Corporation
 + *
@@ -176,7 +176,10 @@ index 0000000..8882bda
 +      }
 +
 +      /* Transfer data */
-+      if (virtqueue_add_buf(vq, sg_list, o_page, i_page, (void *)1, GFP_ATOMIC) >= 0) {
++      struct scatterlist *sgs[2];
++      sgs[0] = &sg_list[0];
++      sgs[1] = &sg_list[1];
++      if (virtqueue_add_sgs(vq, sgs, o_page, i_page, (void *)1, GFP_ATOMIC) >= 0) {
 +              virtqueue_kick(vq);
 +              /* Chill out until it's done with the buffer. */
 +              while (!virtqueue_get_buf(vq, &count))
index 44f691efd0bd20e300b0ae65a2f3a1e3004ba134..22a8ee0e75bb3c82ec4f5fb1cb8758591beeb36c 100644 (file)
@@ -67,9 +67,9 @@
 %define                have_pcmcia     0
 %endif
 
-%define                rel             1
-%define                basever         3.10
-%define                postver         .17
+%define                rel             0.1
+%define                basever         3.12
+%define                postver         .0
 
 # __alt_kernel is list of features, empty string if none set
 # _alt kernel is defined as: %{nil}%{?alt_kernel:-%{?alt_kernel}} (defined in rpm.macros)
@@ -108,7 +108,7 @@ Release:    %{rel}
 Epoch:         3
 License:       GPL v2
 Group:         Base/Kernel
-Source0:       http://www.kernel.org/pub/linux/kernel/v3.x/linux-%{basever}.tar.xz
+Source0:       http://www.kernel.org/pub/linux/kernel/v3.x/linux-%{basever}-rc6.tar.xz
 # Source0-md5: 4f25cd5bec5f8d5a7d935b3f2ccb8481
 %if "%{postver}" != ".0"
 Patch0:                http://www.kernel.org/pub/linux/kernel/v3.x/patch-%{version}.xz
@@ -621,6 +621,7 @@ Pakiet zawiera dokumentację do jądra Linuksa pochodzącą z katalogu
 %setup -qc
 ln -s %{SOURCE7} kernel-module-build.pl
 ln -s %{SOURCE10} Makefile
+mv linux-%{basever}-rc6 linux-%{basever}
 cd linux-%{basever}
 
 %if "%{postver}" != ".0"
@@ -1447,6 +1448,7 @@ fi
 %exclude %{_kernelsrcdir}/arch/powerpc/lib/crtsavres.*
 %endif
 %{_kernelsrcdir}/arch/arm/kvm
+%{_kernelsrcdir}/arch/arm64/kvm
 %{_kernelsrcdir}/arch/mips/kvm
 %{_kernelsrcdir}/arch/s390/kvm
 %{_kernelsrcdir}/arch/x86/kvm
index 650822bece0af59174c34a42b12c52de55075272..022b944ac3433481d3e04af7fe4e6c2da17f9507 100644 (file)
@@ -16,39 +16,35 @@ Signed-off-by: Miklos Szeredi <mszeredi@suse.cz>
  include/linux/fs.h                |    2 ++
  5 files changed, 38 insertions(+), 5 deletions(-)
 
-Index: linux-3.6-rc7-master/Documentation/filesystems/Locking
-===================================================================
---- linux-3.6-rc7-master.orig/Documentation/filesystems/Locking        2012-09-28 13:36:40.000000000 +0200
-+++ linux-3.6-rc7-master/Documentation/filesystems/Locking     2012-09-28 13:36:47.000000000 +0200
-@@ -64,6 +64,7 @@ d_manage:    no              no              yes (ref-walk)  maybe
-       int (*atomic_open)(struct inode *, struct dentry *,
+--- a/Documentation/filesystems/Locking
++++ b/Documentation/filesystems/Locking
+@@ -66,6 +66,7 @@ d_manage:    no              no              yes (ref-walk)  maybe
                                struct file *, unsigned open_flag,
                                umode_t create_mode, int *opened);
+       int (*tmpfile) (struct inode *, struct dentry *, umode_t);
 +      int (*dentry_open)(struct dentry *, struct file *, const struct cred *);
  
  locking rules:
        all may block
-@@ -92,6 +93,7 @@ removexattr: yes
- fiemap:               no
+@@ -93,6 +94,7 @@ removexattr: yes
  update_time:  no
  atomic_open:  yes
+ tmpfile:      no
 +dentry_open:  no
  
        Additionally, ->rmdir(), ->unlink() and ->rename() have ->i_mutex on
  victim.
-Index: linux-3.6-rc7-master/Documentation/filesystems/vfs.txt
-===================================================================
---- linux-3.6-rc7-master.orig/Documentation/filesystems/vfs.txt        2012-09-28 13:36:40.000000000 +0200
-+++ linux-3.6-rc7-master/Documentation/filesystems/vfs.txt     2012-09-28 13:36:47.000000000 +0200
-@@ -363,6 +363,7 @@ struct inode_operations {
-       int (*atomic_open)(struct inode *, struct dentry *,
-                               struct file *, unsigned open_flag,
-                               umode_t create_mode, int *opened);
+--- a/Documentation/filesystems/vfs.txt
++++ b/Documentation/filesystems/vfs.txt
+@@ -362,6 +362,7 @@ struct inode_operations {
+       int (*atomic_open)(struct inode *, struct dentry *, struct file *,
+                       unsigned open_flag, umode_t create_mode, int *opened);
+       int (*tmpfile) (struct inode *, struct dentry *, umode_t);
 +      int (*dentry_open)(struct dentry *, struct file *, const struct cred *);
  };
  
  Again, all methods are called without any locks being held, unless
-@@ -692,6 +693,12 @@ struct address_space_operations {
+@@ -681,6 +682,12 @@ struct address_space_operations {
        but instead uses bmap to find out where the blocks in the file
        are and uses those addresses directly.
  
@@ -61,11 +57,9 @@ Index: linux-3.6-rc7-master/Documentation/filesystems/vfs.txt
  
    invalidatepage: If a page has PagePrivate set, then invalidatepage
          will be called when part or all of the page is to be removed
-Index: linux-3.6-rc7-master/fs/namei.c
-===================================================================
---- linux-3.6-rc7-master.orig/fs/namei.c       2012-09-28 13:36:40.000000000 +0200
-+++ linux-3.6-rc7-master/fs/namei.c    2012-09-28 13:36:47.000000000 +0200
-@@ -2870,9 +2870,12 @@ static int do_last(struct nameidata *nd,
+--- a/fs/namei.c
++++ b/fs/namei.c
+@@ -2915,9 +2915,12 @@ static int do_last(struct nameidata *nd,
        error = may_open(&nd->path, acc_mode, open_flag);
        if (error)
                goto out;
@@ -81,21 +75,19 @@ Index: linux-3.6-rc7-master/fs/namei.c
                if (error == -EOPENSTALE)
                        goto stale_open;
                goto out;
-Index: linux-3.6-rc7-master/fs/open.c
-===================================================================
---- linux-3.6-rc7-master.orig/fs/open.c        2012-09-28 13:36:40.000000000 +0200
-+++ linux-3.6-rc7-master/fs/open.c     2012-09-28 13:36:47.000000000 +0200
-@@ -787,8 +787,7 @@ struct file *dentry_open(const struct pa
+--- a/fs/open.c
++++ b/fs/open.c
+@@ -800,8 +800,7 @@ struct file *dentry_open(const struct pa
        f = get_empty_filp();
        if (!IS_ERR(f)) {
-               f->f_flags = flags;
+               f->f_flags = flags;
 -              f->f_path = *path;
 -              error = do_dentry_open(f, NULL, cred);
 +              error = vfs_open(path, f, cred);
                if (!error) {
-                       /* from now on we need fput() to dispose of f */
+                       /* from now on we need fput() to dispose of f */
                        error = open_check_o_direct(f);
-@@ -803,6 +802,26 @@ struct file *dentry_open(const struct pa
+@@ -818,6 +817,26 @@ struct file *dentry_open(const struct pa
  }
  EXPORT_SYMBOL(dentry_open);
  
@@ -122,19 +114,17 @@ Index: linux-3.6-rc7-master/fs/open.c
  static inline int build_open_flags(int flags, umode_t mode, struct open_flags *op)
  {
        int lookup_flags = 0;
-Index: linux-3.6-rc7-master/include/linux/fs.h
-===================================================================
---- linux-3.6-rc7-master.orig/include/linux/fs.h       2012-09-28 13:36:40.000000000 +0200
-+++ linux-3.6-rc7-master/include/linux/fs.h    2012-09-28 13:36:47.000000000 +0200
-@@ -1573,6 +1573,7 @@ struct inode_operations {
-       int (*atomic_open)(struct inode *, struct dentry *,
+--- a/include/linux/fs.h
++++ b/include/linux/fs.h
+@@ -1585,6 +1585,7 @@ struct inode_operations {
                           struct file *, unsigned open_flag,
                           umode_t create_mode, int *opened);
+       int (*tmpfile) (struct inode *, struct dentry *, umode_t);
 +      int (*dentry_open)(struct dentry *, struct file *, const struct cred *);
  } ____cacheline_aligned;
  
  ssize_t rw_copy_check_uvector(int type, const struct iovec __user * uvector,
-@@ -2211,6 +2212,7 @@ extern long do_sys_open(int dfd, const c
+@@ -2019,6 +2020,7 @@ extern struct file *file_open_name(struc
  extern struct file *filp_open(const char *, int, umode_t);
  extern struct file *file_open_root(struct dentry *, struct vfsmount *,
                                   const char *, int);
index 5667bb02a0adcaf39724e2c3f6bc647ffee76c92..e969e41ebc30df2f31097c3cdc196a978ef69910 100644 (file)
@@ -26,7 +26,7 @@ Signed-off-by: Miklos Szeredi <mszeredi@suse.cz>
 --- a/fs/internal.h
 +++ b/fs/internal.h
 @@ -132,12 +132,6 @@ extern struct dentry *__d_alloc(struct s
- extern ssize_t __kernel_write(struct file *, const char *, size_t, loff_t *);
+ extern int rw_verify_area(int, struct file *, const loff_t *, size_t);
  
  /*
 - * splice.c
index 1a0f1e04f42345fed998c1b56e6713cf7b76b5a9..c3de113f4b321bb9ce89a7a20f1e729c67dc12c1 100644 (file)
@@ -16,18 +16,14 @@ Signed-off-by: Miklos Szeredi <mszeredi@suse.cz>
 
 --- a/fs/internal.h
 +++ b/fs/internal.h
-@@ -42,11 +42,6 @@ static inline int __sync_blockdev(struct
- extern void __init chrdev_init(void);
+@@ -42,7 +42,6 @@ static inline int __sync_blockdev(struct
  /*
-- * namei.c
-- */
--extern int __inode_permission(struct inode *, int);
--
--/*
-  * namespace.c
+  * namei.c
   */
- extern int copy_mount_options(const void __user *, unsigned long *);
+-extern int __inode_permission(struct inode *, int);
+ extern int user_path_mountpoint_at(int, const char __user *, unsigned int, struct path *);
+ extern int vfs_path_lookup(struct dentry *, struct vfsmount *,
+                          const char *, unsigned int, struct path *);
 --- a/fs/namei.c
 +++ b/fs/namei.c
 @@ -402,6 +402,7 @@ int __inode_permission(struct inode *ino
index f37efbcf0b45948bd02238d907521ddb2f403502..23e22832b782377b1eaec52658d58cdbd84a9ca4 100644 (file)
@@ -87,17 +87,17 @@ Signed-off-by: Miklos Szeredi <mszeredi@suse.cz>
  fs/Makefile              |    1 
  fs/overlayfs/Kconfig     |   10 
  fs/overlayfs/Makefile    |    7 
- fs/overlayfs/copy_up.c   |  385 +++++++++++++++++++++++++++++
+ fs/overlayfs/copy_up.c   |  388 +++++++++++++++++++++++++++++
  fs/overlayfs/dir.c       |  605 ++++++++++++++++++++++++++++++++++++++++++++++
  fs/overlayfs/inode.c     |  372 ++++++++++++++++++++++++++++
  fs/overlayfs/overlayfs.h |   70 +++++
- fs/overlayfs/readdir.c   |  566 +++++++++++++++++++++++++++++++++++++++++++
+ fs/overlayfs/readdir.c   |  567 +++++++++++++++++++++++++++++++++++++++++++
  fs/overlayfs/super.c     |  612 +++++++++++++++++++++++++++++++++++++++++++++++
- 10 files changed, 2629 insertions(+)
+ 10 files changed, 2633 insertions(+)
 
 --- a/fs/Kconfig
 +++ b/fs/Kconfig
-@@ -70,6 +70,7 @@ source "fs/quota/Kconfig"
+@@ -67,6 +67,7 @@ source "fs/quota/Kconfig"
  
  source "fs/autofs4/Kconfig"
  source "fs/fuse/Kconfig"
@@ -107,7 +107,7 @@ Signed-off-by: Miklos Szeredi <mszeredi@suse.cz>
        bool
 --- a/fs/Makefile
 +++ b/fs/Makefile
-@@ -108,6 +108,7 @@ obj-$(CONFIG_QNX6FS_FS)            += qnx6/
+@@ -105,6 +105,7 @@ obj-$(CONFIG_QNX6FS_FS)            += qnx6/
  obj-$(CONFIG_AUTOFS4_FS)      += autofs4/
  obj-$(CONFIG_ADFS_FS)         += adfs/
  obj-$(CONFIG_FUSE_FS)         += fuse/
@@ -140,7 +140,7 @@ Signed-off-by: Miklos Szeredi <mszeredi@suse.cz>
 +overlayfs-objs := super.o inode.o dir.o readdir.o copy_up.o
 --- /dev/null
 +++ b/fs/overlayfs/copy_up.c
-@@ -0,0 +1,387 @@
+@@ -0,0 +1,388 @@
 +/*
 + *
 + * Copyright (C) 2011 Novell Inc.
@@ -253,6 +253,7 @@ Signed-off-by: Miklos Szeredi <mszeredi@suse.cz>
 +                      error = bytes;
 +                      break;
 +              }
++              WARN_ON(old_pos != new_pos);
 +
 +              len -= bytes;
 +      }
@@ -1586,7 +1587,7 @@ Signed-off-by: Miklos Szeredi <mszeredi@suse.cz>
 +int ovl_copy_up_truncate(struct dentry *dentry, loff_t size);
 --- /dev/null
 +++ b/fs/overlayfs/readdir.c
-@@ -0,0 +1,566 @@
+@@ -0,0 +1,567 @@
 +/*
 + *
 + * Copyright (C) 2011 Novell Inc.
@@ -1617,6 +1618,8 @@ Signed-off-by: Miklos Szeredi <mszeredi@suse.cz>
 +};
 +
 +struct ovl_readdir_data {
++      struct dir_context ctx;
++      bool is_merge;
 +      struct rb_root *root;
 +      struct list_head *list;
 +      struct list_head *middle;
@@ -1714,13 +1717,12 @@ Signed-off-by: Miklos Szeredi <mszeredi@suse.cz>
 +      return 0;
 +}
 +
-+static int ovl_fill_lower(void *buf, const char *name, int namelen,
-+                          loff_t offset, u64 ino, unsigned int d_type)
++static int ovl_fill_lower(struct ovl_readdir_data *rdd,
++                        const char *name, int namelen,
++                        loff_t offset, u64 ino, unsigned int d_type)
 +{
-+      struct ovl_readdir_data *rdd = buf;
 +      struct ovl_cache_entry *p;
 +
-+      rdd->count++;
 +      p = ovl_cache_entry_find(rdd->root, name, namelen);
 +      if (p) {
 +              list_move_tail(&p->l_node, rdd->middle);
@@ -1746,17 +1748,20 @@ Signed-off-by: Miklos Szeredi <mszeredi@suse.cz>
 +      INIT_LIST_HEAD(list);
 +}
 +
-+static int ovl_fill_upper(void *buf, const char *name, int namelen,
++static int ovl_fill_merge(void *buf, const char *name, int namelen,
 +                        loff_t offset, u64 ino, unsigned int d_type)
 +{
 +      struct ovl_readdir_data *rdd = buf;
 +
 +      rdd->count++;
-+      return ovl_cache_entry_add_rb(rdd, name, namelen, ino, d_type);
++      if (!rdd->is_merge)
++              return ovl_cache_entry_add_rb(rdd, name, namelen, ino, d_type);
++      else
++              return ovl_fill_lower(rdd, name, namelen, offset, ino, d_type);
 +}
 +
 +static inline int ovl_dir_read(struct path *realpath,
-+                             struct ovl_readdir_data *rdd, filldir_t filler)
++                             struct ovl_readdir_data *rdd)
 +{
 +      struct file *realfile;
 +      int err;
@@ -1765,10 +1770,11 @@ Signed-off-by: Miklos Szeredi <mszeredi@suse.cz>
 +      if (IS_ERR(realfile))
 +              return PTR_ERR(realfile);
 +
++      rdd->ctx.pos = 0;
 +      do {
 +              rdd->count = 0;
 +              rdd->err = 0;
-+              err = vfs_readdir(realfile, filler, rdd);
++              err = iterate_dir(realfile, &rdd->ctx);
 +              if (err >= 0)
 +                      err = rdd->err;
 +      } while (!err && rdd->count);
@@ -1838,20 +1844,25 @@ Signed-off-by: Miklos Szeredi <mszeredi@suse.cz>
 +
 +static inline int ovl_dir_read_merged(struct path *upperpath,
 +                                    struct path *lowerpath,
-+                                    struct ovl_readdir_data *rdd)
++                                    struct list_head *list)
 +{
 +      int err;
 +      struct rb_root root = RB_ROOT;
 +      struct list_head middle;
++      struct ovl_readdir_data rdd = {
++              .ctx.actor = ovl_fill_merge,
++              .list = list,
++              .root = &root,
++              .is_merge = false,
++      };
 +
-+      rdd->root = &root;
 +      if (upperpath->dentry) {
-+              rdd->dir = upperpath->dentry;
-+              err = ovl_dir_read(upperpath, rdd, ovl_fill_upper);
++              rdd.dir = upperpath->dentry;
++              err = ovl_dir_read(upperpath, &rdd);
 +              if (err)
 +                      goto out;
 +
-+              err = ovl_dir_mark_whiteouts(rdd);
++              err = ovl_dir_mark_whiteouts(&rdd);
 +              if (err)
 +                      goto out;
 +      }
@@ -1859,13 +1870,12 @@ Signed-off-by: Miklos Szeredi <mszeredi@suse.cz>
 +       * Insert lowerpath entries before upperpath ones, this allows
 +       * offsets to be reasonably constant
 +       */
-+      list_add(&middle, rdd->list);
-+      rdd->middle = &middle;
-+      err = ovl_dir_read(lowerpath, rdd, ovl_fill_lower);
++      list_add(&middle, rdd.list);
++      rdd.middle = &middle;
++      rdd.is_merge = true;
++      err = ovl_dir_read(lowerpath, &rdd);
 +      list_del(&middle);
 +out:
-+      rdd->root = NULL;
-+
 +      return err;
 +}
 +
@@ -1883,17 +1893,16 @@ Signed-off-by: Miklos Szeredi <mszeredi@suse.cz>
 +      list_move_tail(&od->cursor, l);
 +}
 +
-+static int ovl_readdir(struct file *file, void *buf, filldir_t filler)
++static int ovl_iterate(struct file *file, struct dir_context *ctx)
 +{
 +      struct ovl_dir_file *od = file->private_data;
 +      int res;
 +
-+      if (!file->f_pos)
++      if (!ctx->pos)
 +              ovl_dir_reset(file);
 +
 +      if (od->is_real) {
-+              res = vfs_readdir(od->realfile, filler, buf);
-+              file->f_pos = od->realfile->f_pos;
++              res = iterate_dir(od->realfile, ctx);
 +
 +              return res;
 +      }
@@ -1901,37 +1910,31 @@ Signed-off-by: Miklos Szeredi <mszeredi@suse.cz>
 +      if (!od->is_cached) {
 +              struct path lowerpath;
 +              struct path upperpath;
-+              struct ovl_readdir_data rdd = { .list = &od->cache };
 +
 +              ovl_path_lower(file->f_path.dentry, &lowerpath);
 +              ovl_path_upper(file->f_path.dentry, &upperpath);
 +
-+              res = ovl_dir_read_merged(&upperpath, &lowerpath, &rdd);
++              res = ovl_dir_read_merged(&upperpath, &lowerpath, &od->cache);
 +              if (res) {
-+                      ovl_cache_free(rdd.list);
++                      ovl_cache_free(&od->cache);
 +                      return res;
 +              }
 +
 +              od->cache_version = ovl_dentry_version_get(file->f_path.dentry);
 +              od->is_cached = true;
 +
-+              ovl_seek_cursor(od, file->f_pos);
++              ovl_seek_cursor(od, ctx->pos);
 +      }
 +
 +      while (od->cursor.next != &od->cache) {
-+              int over;
-+              loff_t off;
 +              struct ovl_cache_entry *p;
 +
 +              p = list_entry(od->cursor.next, struct ovl_cache_entry, l_node);
-+              off = file->f_pos;
 +              if (!p->is_whiteout) {
-+                      over = filler(buf, p->name, p->len, off, p->ino,
-+                                    p->type);
-+                      if (over)
++                      if (!dir_emit(ctx, p->name, p->len, p->ino, p->type))
 +                              break;
 +              }
-+              file->f_pos++;
++              ctx->pos++;
 +              list_move(&od->cursor, &p->l_node);
 +      }
 +
@@ -2039,7 +2042,7 @@ Signed-off-by: Miklos Szeredi <mszeredi@suse.cz>
 +const struct file_operations ovl_dir_operations = {
 +      .read           = generic_read_dir,
 +      .open           = ovl_dir_open,
-+      .readdir        = ovl_readdir,
++      .iterate        = ovl_iterate,
 +      .llseek         = ovl_dir_llseek,
 +      .fsync          = ovl_dir_fsync,
 +      .release        = ovl_dir_release,
@@ -2051,12 +2054,11 @@ Signed-off-by: Miklos Szeredi <mszeredi@suse.cz>
 +      struct path lowerpath;
 +      struct path upperpath;
 +      struct ovl_cache_entry *p;
-+      struct ovl_readdir_data rdd = { .list = list };
 +
 +      ovl_path_upper(dentry, &upperpath);
 +      ovl_path_lower(dentry, &lowerpath);
 +
-+      err = ovl_dir_read_merged(&upperpath, &lowerpath, &rdd);
++      err = ovl_dir_read_merged(&upperpath, &lowerpath, list);
 +      if (err)
 +              return err;
 +
index bc6b60d416fea33f81a311a8585b2c07b13f9293..16a64df381d5695c3d656cd77fca5f89fdae35c8 100644 (file)
@@ -74,13 +74,13 @@ Signed-off-by: Miklos Szeredi <mszeredi@suse.cz>
   *
 @@ -1322,6 +1328,11 @@ struct super_block {
  
-       /* Being remounted read-only */
-       int s_readonly_remount;
+       /* AIO completions deferred from interrupt context */
+       struct workqueue_struct *s_dio_done_wq;
 +
 +      /*
 +       * Indicates how deep in a filesystem stack this SB is
 +       */
 +      int s_stack_depth;
- };
  
- /* superblock cache pruning functions */
+       /*
+        * Keep the lru lists last in the structure so they always sit on their
This page took 0.429772 seconds and 4 git commands to generate.