linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH 1/7] vfs - merge path_is_mountpoint() and path_is_mountpoint_rcu()
@ 2016-11-28  2:11 Ian Kent
  2016-11-28  2:11 ` [PATCH 2/7] autofs - make struct path const in autofs4_dir_open() Ian Kent
                   ` (7 more replies)
  0 siblings, 8 replies; 19+ messages in thread
From: Ian Kent @ 2016-11-28  2:11 UTC (permalink / raw)
  To: Andrew Morton
  Cc: autofs mailing list, Kernel Mailing List, Eric W. Biederman,
	linux-fsdevel, Omar Sandoval, Al Viro

From: Ian Kent <ikent@redhat.com>

Forgetting that the rcu lock allows nesting I added a superfluous rcu
version of path_is_mountpoint().

Merge it and the rcu version, make the common case (d_mountpoint()
returning true) inline and change the path parameter to a const.

Also move the function definition to include/linux/mount.h as it
seems a more sensible place for it.

Signed-off-by: Ian Kent <raven@themaw.net>
Cc: Al Viro <viro@ZenIV.linux.org.uk>
Cc: Eric W. Biederman <ebiederm@xmission.com>
Cc: Omar Sandoval <osandov@osandov.com>
---
 fs/autofs4/root.c     |   11 +++--------
 fs/namespace.c        |   41 ++++++++++++++---------------------------
 include/linux/fs.h    |    2 --
 include/linux/mount.h |   11 +++++++++++
 4 files changed, 28 insertions(+), 37 deletions(-)

diff --git a/fs/autofs4/root.c b/fs/autofs4/root.c
index c4df881..dd2ea5d 100644
--- a/fs/autofs4/root.c
+++ b/fs/autofs4/root.c
@@ -437,13 +437,8 @@ static int autofs4_d_manage(struct path *path, bool rcu_walk)
 
 	/* The daemon never waits. */
 	if (autofs4_oz_mode(sbi)) {
-		if (rcu_walk) {
-			if (!path_is_mountpoint_rcu(path))
-				return -EISDIR;
-		} else {
-			if (!path_is_mountpoint(path))
-				return -EISDIR;
-		}
+		if (!path_is_mountpoint(path))
+			return -EISDIR;
 		return 0;
 	}
 
@@ -471,7 +466,7 @@ static int autofs4_d_manage(struct path *path, bool rcu_walk)
 
 		if (ino->flags & AUTOFS_INF_WANT_EXPIRE)
 			return 0;
-		if (path_is_mountpoint_rcu(path))
+		if (path_is_mountpoint(path))
 			return 0;
 		inode = d_inode_rcu(dentry);
 		if (inode && S_ISLNK(inode->i_mode))
diff --git a/fs/namespace.c b/fs/namespace.c
index 79473ee..da1cd87 100644
--- a/fs/namespace.c
+++ b/fs/namespace.c
@@ -1160,12 +1160,23 @@ struct vfsmount *mntget(struct vfsmount *mnt)
 }
 EXPORT_SYMBOL(mntget);
 
-static bool __path_is_mountpoint(struct path *path)
+/* __path_is_mountpoint() - Check if path is a mount in the current
+ *                          namespace.
+ *
+ *  d_mountpoint() can only be used reliably to establish if a dentry is
+ *  not mounted in any namespace and that common case is handled inline.
+ *  d_mountpoint() isn't aware of the possibility there may be multiple
+ *  mounts using a given dentry in a different namespace. This function
+ *  checks if the passed in path is a mountpoint rather than the dentry
+ *  alone.
+ */
+bool __path_is_mountpoint(const struct path *path)
 {
 	struct mount *mount;
 	struct vfsmount *mnt;
 	unsigned seq;
 
+	rcu_read_lock();
 	do {
 		seq = read_seqbegin(&mount_lock);
 		mount = __lookup_mnt(path->mnt, path->dentry);
@@ -1173,35 +1184,11 @@ static bool __path_is_mountpoint(struct path *path)
 	} while (mnt &&
 		 !(mnt->mnt_flags & MNT_SYNC_UMOUNT) &&
 		 read_seqretry(&mount_lock, seq));
-
-	return mnt != NULL;
-}
-
-/* Check if path is a mount in current namespace */
-bool path_is_mountpoint(struct path *path)
-{
-	bool res;
-
-	if (!d_mountpoint(path->dentry))
-		return false;
-
-	rcu_read_lock();
-	res = __path_is_mountpoint(path);
 	rcu_read_unlock();
 
-	return res;
-}
-EXPORT_SYMBOL(path_is_mountpoint);
-
-/* Check if path is a mount in current namespace */
-bool path_is_mountpoint_rcu(struct path *path)
-{
-	if (!d_mountpoint(path->dentry))
-		return false;
-
-	return __path_is_mountpoint(path);
+	return mnt != NULL;
 }
-EXPORT_SYMBOL(path_is_mountpoint_rcu);
+EXPORT_SYMBOL(__path_is_mountpoint);
 
 struct vfsmount *mnt_clone_internal(struct path *path)
 {
diff --git a/include/linux/fs.h b/include/linux/fs.h
index 03a5a39..83de8b6 100644
--- a/include/linux/fs.h
+++ b/include/linux/fs.h
@@ -2095,8 +2095,6 @@ extern int vfs_ustat(dev_t, struct kstatfs *);
 extern int freeze_super(struct super_block *super);
 extern int thaw_super(struct super_block *super);
 extern bool our_mnt(struct vfsmount *mnt);
-extern bool path_is_mountpoint(struct path *);
-extern bool path_is_mountpoint_rcu(struct path *);
 
 extern int current_umask(void);
 
diff --git a/include/linux/mount.h b/include/linux/mount.h
index 1172cce..42dc62b 100644
--- a/include/linux/mount.h
+++ b/include/linux/mount.h
@@ -15,6 +15,8 @@
 #include <linux/spinlock.h>
 #include <linux/seqlock.h>
 #include <linux/atomic.h>
+#include <linux/path.h>
+#include <linux/dcache.h>
 
 struct super_block;
 struct vfsmount;
@@ -98,4 +100,13 @@ extern dev_t name_to_dev_t(const char *name);
 
 extern unsigned int sysctl_mount_max;
 
+extern bool __path_is_mountpoint(const struct path *path);
+static inline bool path_is_mountpoint(const struct path *path)
+{
+	if (!d_mountpoint(path->dentry))
+		return 0;
+
+	return __path_is_mountpoint(path);
+}
+
 #endif /* _LINUX_MOUNT_H */

^ permalink raw reply related	[flat|nested] 19+ messages in thread

* [PATCH 2/7] autofs - make struct path const in autofs4_dir_open()
  2016-11-28  2:11 [PATCH 1/7] vfs - merge path_is_mountpoint() and path_is_mountpoint_rcu() Ian Kent
@ 2016-11-28  2:11 ` Ian Kent
  2016-11-28  2:11 ` [PATCH 3/7] autofs - change struct path to const in autofs4_expire_wait() and autofs4_wait() Ian Kent
                   ` (6 subsequent siblings)
  7 siblings, 0 replies; 19+ messages in thread
From: Ian Kent @ 2016-11-28  2:11 UTC (permalink / raw)
  To: Andrew Morton
  Cc: autofs mailing list, Kernel Mailing List, Eric W. Biederman,
	linux-fsdevel, Omar Sandoval, Al Viro

From: Ian Kent <ikent@redhat.com>

There's no reason to copy the file->f_path in autofs4_dir_open() and
f_path is not modified so change it to a "const struct path *".

Signed-off-by: Ian Kent <raven@themaw.net>
Cc: Al Viro <viro@ZenIV.linux.org.uk>
Cc: Eric W. Biederman <ebiederm@xmission.com>
Cc: Omar Sandoval <osandov@osandov.com>
---
 fs/autofs4/root.c |    6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/fs/autofs4/root.c b/fs/autofs4/root.c
index dd2ea5d..3e33f00 100644
--- a/fs/autofs4/root.c
+++ b/fs/autofs4/root.c
@@ -107,14 +107,14 @@ static int autofs4_dir_open(struct inode *inode, struct file *file)
 {
 	struct dentry *dentry = file->f_path.dentry;
 	struct autofs_sb_info *sbi = autofs4_sbi(dentry->d_sb);
-	struct path path;
+	const struct path *path;
 
 	pr_debug("file=%p dentry=%p %pd\n", file, dentry, dentry);
 
 	if (autofs4_oz_mode(sbi))
 		goto out;
 
-	path = file->f_path;
+	path = &file->f_path;
 
 	/*
 	 * An empty directory in an autofs file system is always a
@@ -126,7 +126,7 @@ static int autofs4_dir_open(struct inode *inode, struct file *file)
 	 * it.
 	 */
 	spin_lock(&sbi->lookup_lock);
-	if (!path_is_mountpoint(&path) && simple_empty(dentry)) {
+	if (!path_is_mountpoint(path) && simple_empty(dentry)) {
 		spin_unlock(&sbi->lookup_lock);
 		return -ENOENT;
 	}

^ permalink raw reply related	[flat|nested] 19+ messages in thread

* [PATCH 3/7] autofs - change struct path to const in autofs4_expire_wait() and autofs4_wait()
  2016-11-28  2:11 [PATCH 1/7] vfs - merge path_is_mountpoint() and path_is_mountpoint_rcu() Ian Kent
  2016-11-28  2:11 ` [PATCH 2/7] autofs - make struct path const in autofs4_dir_open() Ian Kent
@ 2016-11-28  2:11 ` Ian Kent
  2016-11-28  2:12 ` [PATCH 4/7] vfs - change struct path to const in d_manage() Ian Kent
                   ` (5 subsequent siblings)
  7 siblings, 0 replies; 19+ messages in thread
From: Ian Kent @ 2016-11-28  2:11 UTC (permalink / raw)
  To: Andrew Morton
  Cc: autofs mailing list, Kernel Mailing List, Eric W. Biederman,
	linux-fsdevel, Omar Sandoval, Al Viro

From: Ian Kent <ikent@redhat.com>

The functions autofs4_expire_wait() and autofs4_wait() don't modify
the passed struct path so change it to a const.

Signed-off-by: Ian Kent <raven@themaw.net>
Cc: Al Viro <viro@ZenIV.linux.org.uk>
Cc: Eric W. Biederman <ebiederm@xmission.com>
Cc: Omar Sandoval <osandov@osandov.com>
---
 fs/autofs4/autofs_i.h |    5 +++--
 fs/autofs4/expire.c   |    4 ++--
 fs/autofs4/root.c     |    6 +++---
 fs/autofs4/waitq.c    |    4 ++--
 4 files changed, 10 insertions(+), 9 deletions(-)

diff --git a/fs/autofs4/autofs_i.h b/fs/autofs4/autofs_i.h
index 14cef41..c885daa 100644
--- a/fs/autofs4/autofs_i.h
+++ b/fs/autofs4/autofs_i.h
@@ -145,7 +145,7 @@ void autofs4_free_ino(struct autofs_info *);
 
 /* Expiration */
 int is_autofs4_dentry(struct dentry *);
-int autofs4_expire_wait(struct path *path, int rcu_walk);
+int autofs4_expire_wait(const struct path *path, int rcu_walk);
 int autofs4_expire_run(struct super_block *, struct vfsmount *,
 		       struct autofs_sb_info *,
 		       struct autofs_packet_expire __user *);
@@ -217,7 +217,8 @@ static inline int autofs_prepare_pipe(struct file *pipe)
 
 /* Queue management functions */
 
-int autofs4_wait(struct autofs_sb_info *, struct path *, enum autofs_notify);
+int autofs4_wait(struct autofs_sb_info *,
+		 const struct path *, enum autofs_notify);
 int autofs4_wait_release(struct autofs_sb_info *, autofs_wqt_t, int);
 void autofs4_catatonic_mode(struct autofs_sb_info *);
 
diff --git a/fs/autofs4/expire.c b/fs/autofs4/expire.c
index a37ba40..13178bf 100644
--- a/fs/autofs4/expire.c
+++ b/fs/autofs4/expire.c
@@ -495,7 +495,7 @@ struct dentry *autofs4_expire_indirect(struct super_block *sb,
 	return expired;
 }
 
-int autofs4_expire_wait(struct path *path, int rcu_walk)
+int autofs4_expire_wait(const struct path *path, int rcu_walk)
 {
 	struct dentry *dentry = path->dentry;
 	struct autofs_sb_info *sbi = autofs4_sbi(dentry->d_sb);
@@ -593,7 +593,7 @@ int autofs4_do_expire_multi(struct super_block *sb, struct vfsmount *mnt,
 
 	if (dentry) {
 		struct autofs_info *ino = autofs4_dentry_ino(dentry);
-		struct path path = { .mnt = mnt, .dentry = dentry };
+		const struct path path = { .mnt = mnt, .dentry = dentry };
 
 		/* This is synchronous because it makes the daemon a
 		 * little easier
diff --git a/fs/autofs4/root.c b/fs/autofs4/root.c
index 3e33f00..859eef9 100644
--- a/fs/autofs4/root.c
+++ b/fs/autofs4/root.c
@@ -272,7 +272,7 @@ static struct dentry *autofs4_lookup_expiring(struct dentry *dentry,
 	return NULL;
 }
 
-static int autofs4_mount_wait(struct path *path, bool rcu_walk)
+static int autofs4_mount_wait(const struct path *path, bool rcu_walk)
 {
 	struct autofs_sb_info *sbi = autofs4_sbi(path->dentry->d_sb);
 	struct autofs_info *ino = autofs4_dentry_ino(path->dentry);
@@ -289,7 +289,7 @@ static int autofs4_mount_wait(struct path *path, bool rcu_walk)
 	return status;
 }
 
-static int do_expire_wait(struct path *path, bool rcu_walk)
+static int do_expire_wait(const struct path *path, bool rcu_walk)
 {
 	struct dentry *dentry = path->dentry;
 	struct dentry *expiring;
@@ -300,7 +300,7 @@ static int do_expire_wait(struct path *path, bool rcu_walk)
 	if (!expiring)
 		return autofs4_expire_wait(path, rcu_walk);
 	else {
-		struct path this = { .mnt = path->mnt, .dentry = expiring };
+		const struct path this = { .mnt = path->mnt, .dentry = expiring };
 		/*
 		 * If we are racing with expire the request might not
 		 * be quite complete, but the directory has been removed
diff --git a/fs/autofs4/waitq.c b/fs/autofs4/waitq.c
index e7a037f..1278335 100644
--- a/fs/autofs4/waitq.c
+++ b/fs/autofs4/waitq.c
@@ -250,7 +250,7 @@ autofs4_find_wait(struct autofs_sb_info *sbi, const struct qstr *qstr)
 static int validate_request(struct autofs_wait_queue **wait,
 			    struct autofs_sb_info *sbi,
 			    const struct qstr *qstr,
-			    struct path *path, enum autofs_notify notify)
+			    const struct path *path, enum autofs_notify notify)
 {
 	struct dentry *dentry = path->dentry;
 	struct autofs_wait_queue *wq;
@@ -349,7 +349,7 @@ static int validate_request(struct autofs_wait_queue **wait,
 }
 
 int autofs4_wait(struct autofs_sb_info *sbi,
-		 struct path *path, enum autofs_notify notify)
+		 const struct path *path, enum autofs_notify notify)
 {
 	struct dentry *dentry = path->dentry;
 	struct autofs_wait_queue *wq;

^ permalink raw reply related	[flat|nested] 19+ messages in thread

* [PATCH 4/7] vfs - change struct path to const in d_manage()
  2016-11-28  2:11 [PATCH 1/7] vfs - merge path_is_mountpoint() and path_is_mountpoint_rcu() Ian Kent
  2016-11-28  2:11 ` [PATCH 2/7] autofs - make struct path const in autofs4_dir_open() Ian Kent
  2016-11-28  2:11 ` [PATCH 3/7] autofs - change struct path to const in autofs4_expire_wait() and autofs4_wait() Ian Kent
@ 2016-11-28  2:12 ` Ian Kent
  2016-11-28  2:12 ` [PATCH 5/7] vfs - constify path parameter of path_has_submounts() Ian Kent
                   ` (4 subsequent siblings)
  7 siblings, 0 replies; 19+ messages in thread
From: Ian Kent @ 2016-11-28  2:12 UTC (permalink / raw)
  To: Andrew Morton
  Cc: autofs mailing list, Kernel Mailing List, Eric W. Biederman,
	linux-fsdevel, Omar Sandoval, Al Viro

From: Ian Kent <ikent@redhat.com>

The ->d_manage() function is meant to be used to check if an
automount is in progress and to block if needed before the
mount is followed.

It shouldn't need to modify the passed struct path.

Make that usage explicit by changing ->d_manage() path parameter
to a const.

Signed-off-by: Ian Kent <raven@themaw.net>
Cc: Al Viro <viro@ZenIV.linux.org.uk>
Cc: Eric W. Biederman <ebiederm@xmission.com>
Cc: Omar Sandoval <osandov@osandov.com>
---
 Documentation/filesystems/Locking |    2 +-
 Documentation/filesystems/vfs.txt |    2 +-
 fs/autofs4/root.c                 |    4 ++--
 fs/namei.c                        |    2 +-
 include/linux/dcache.h            |    2 +-
 5 files changed, 6 insertions(+), 6 deletions(-)

diff --git a/Documentation/filesystems/Locking b/Documentation/filesystems/Locking
index 08c9e56..ace63cd 100644
--- a/Documentation/filesystems/Locking
+++ b/Documentation/filesystems/Locking
@@ -20,7 +20,7 @@ prototypes:
 	void (*d_iput)(struct dentry *, struct inode *);
 	char *(*d_dname)((struct dentry *dentry, char *buffer, int buflen);
 	struct vfsmount *(*d_automount)(struct path *path);
-	int (*d_manage)(struct path *, bool);
+	int (*d_manage)(const struct path *, bool);
 	struct dentry *(*d_real)(struct dentry *, const struct inode *,
 				 unsigned int);
 
diff --git a/Documentation/filesystems/vfs.txt b/Documentation/filesystems/vfs.txt
index e54e992..3893f4d 100644
--- a/Documentation/filesystems/vfs.txt
+++ b/Documentation/filesystems/vfs.txt
@@ -948,7 +948,7 @@ struct dentry_operations {
 	void (*d_iput)(struct dentry *, struct inode *);
 	char *(*d_dname)(struct dentry *, char *, int);
 	struct vfsmount *(*d_automount)(struct path *);
-	int (*d_manage)(struct path *, bool);
+	int (*d_manage)(const struct path *, bool);
 	struct dentry *(*d_real)(struct dentry *, const struct inode *,
 				 unsigned int);
 };
diff --git a/fs/autofs4/root.c b/fs/autofs4/root.c
index 859eef9..08718d3 100644
--- a/fs/autofs4/root.c
+++ b/fs/autofs4/root.c
@@ -32,7 +32,7 @@ static int autofs4_dir_open(struct inode *inode, struct file *file);
 static struct dentry *autofs4_lookup(struct inode *,
 				     struct dentry *, unsigned int);
 static struct vfsmount *autofs4_d_automount(struct path *);
-static int autofs4_d_manage(struct path *, bool);
+static int autofs4_d_manage(const struct path *, bool);
 static void autofs4_dentry_release(struct dentry *);
 
 const struct file_operations autofs4_root_operations = {
@@ -426,7 +426,7 @@ static struct vfsmount *autofs4_d_automount(struct path *path)
 	return NULL;
 }
 
-static int autofs4_d_manage(struct path *path, bool rcu_walk)
+static int autofs4_d_manage(const struct path *path, bool rcu_walk)
 {
 	struct dentry *dentry = path->dentry;
 	struct autofs_sb_info *sbi = autofs4_sbi(dentry->d_sb);
diff --git a/fs/namei.c b/fs/namei.c
index 1669c93d..8e9a358 100644
--- a/fs/namei.c
+++ b/fs/namei.c
@@ -1263,7 +1263,7 @@ int follow_down_one(struct path *path)
 }
 EXPORT_SYMBOL(follow_down_one);
 
-static inline int managed_dentry_rcu(struct path *path)
+static inline int managed_dentry_rcu(const struct path *path)
 {
 	return (path->dentry->d_flags & DCACHE_MANAGE_TRANSIT) ?
 		path->dentry->d_op->d_manage(path, true) : 0;
diff --git a/include/linux/dcache.h b/include/linux/dcache.h
index 44a9a9b..f835bd4 100644
--- a/include/linux/dcache.h
+++ b/include/linux/dcache.h
@@ -139,7 +139,7 @@ struct dentry_operations {
 	void (*d_iput)(struct dentry *, struct inode *);
 	char *(*d_dname)(struct dentry *, char *, int);
 	struct vfsmount *(*d_automount)(struct path *);
-	int (*d_manage)(struct path *, bool);
+	int (*d_manage)(const struct path *, bool);
 	struct dentry *(*d_real)(struct dentry *, const struct inode *,
 				 unsigned int);
 } ____cacheline_aligned;

^ permalink raw reply related	[flat|nested] 19+ messages in thread

* [PATCH 5/7] vfs - constify path parameter of path_has_submounts()
  2016-11-28  2:11 [PATCH 1/7] vfs - merge path_is_mountpoint() and path_is_mountpoint_rcu() Ian Kent
                   ` (2 preceding siblings ...)
  2016-11-28  2:12 ` [PATCH 4/7] vfs - change struct path to const in d_manage() Ian Kent
@ 2016-11-28  2:12 ` Ian Kent
  2016-11-28  2:12 ` [PATCH 6/7] autofs - dont hold spin lock over direct mount expire Ian Kent
                   ` (3 subsequent siblings)
  7 siblings, 0 replies; 19+ messages in thread
From: Ian Kent @ 2016-11-28  2:12 UTC (permalink / raw)
  To: Andrew Morton
  Cc: autofs mailing list, Kernel Mailing List, Eric W. Biederman,
	linux-fsdevel, Omar Sandoval, Al Viro

From: Ian Kent <ikent@redhat.com>

path_has_submounts() doesn't modify the passed in path parameter,
and shouldn't need to, make that usage explicit.

Signed-off-by: Ian Kent <raven@themaw.net>
Cc: Al Viro <viro@ZenIV.linux.org.uk>
Cc: Eric W. Biederman <ebiederm@xmission.com>
Cc: Omar Sandoval <osandov@osandov.com>
---
 fs/dcache.c            |    2 +-
 include/linux/dcache.h |    2 +-
 2 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/fs/dcache.c b/fs/dcache.c
index 719d8b4..29bc910 100644
--- a/fs/dcache.c
+++ b/fs/dcache.c
@@ -1298,7 +1298,7 @@ static enum d_walk_ret path_check_mount(void *data, struct dentry *dentry)
  * Return true if the parent or its subdirectories contain
  * a mount point in the current namespace.
  */
-int path_has_submounts(struct path *parent)
+int path_has_submounts(const struct path *parent)
 {
 	struct check_mount data = { .mnt = parent->mnt, .mounted = 0 };
 
diff --git a/include/linux/dcache.h b/include/linux/dcache.h
index f835bd4..c965e44 100644
--- a/include/linux/dcache.h
+++ b/include/linux/dcache.h
@@ -254,7 +254,7 @@ extern struct dentry *d_find_alias(struct inode *);
 extern void d_prune_aliases(struct inode *);
 
 /* test whether we have any submounts in a subdir tree */
-extern int path_has_submounts(struct path *);
+extern int path_has_submounts(const struct path *);
 
 /*
  * This adds the entry to the hash queues.

^ permalink raw reply related	[flat|nested] 19+ messages in thread

* [PATCH 6/7] autofs - dont hold spin lock over direct mount expire
  2016-11-28  2:11 [PATCH 1/7] vfs - merge path_is_mountpoint() and path_is_mountpoint_rcu() Ian Kent
                   ` (3 preceding siblings ...)
  2016-11-28  2:12 ` [PATCH 5/7] vfs - constify path parameter of path_has_submounts() Ian Kent
@ 2016-11-28  2:12 ` Ian Kent
  2016-11-28  2:12 ` [PATCH 7/7] vfs - make may_umount_tree() mount propogation aware Ian Kent
                   ` (2 subsequent siblings)
  7 siblings, 0 replies; 19+ messages in thread
From: Ian Kent @ 2016-11-28  2:12 UTC (permalink / raw)
  To: Andrew Morton
  Cc: autofs mailing list, Kernel Mailing List, Eric W. Biederman,
	linux-fsdevel, Omar Sandoval, Al Viro

From: Ian Kent <ikent@redhat.com>

Commit 7cbdb4a286 altered the autofs indirect mount expire to
not hold a spin lock during the expire check.

The direct mount expire needs the same treatment because to
make autofs expires namespace aware may_umount_tree() needs to
to use a similar method to may_umount() when checking if a mount
tree is in use.

This means may_umount_tree() will end up taking the namespace_sem
for the check so the autofs direct mount expire won't be allowed
to hold a spin lock over the check.

Signed-off-by: Ian Kent <raven@themaw.net>
Cc: Al Viro <viro@ZenIV.linux.org.uk>
Cc: Eric W. Biederman <ebiederm@xmission.com>
Cc: Omar Sandoval <osandov@osandov.com>
---
 fs/autofs4/expire.c |   17 ++++++++++-------
 1 file changed, 10 insertions(+), 7 deletions(-)

diff --git a/fs/autofs4/expire.c b/fs/autofs4/expire.c
index 13178bf..57725d4 100644
--- a/fs/autofs4/expire.c
+++ b/fs/autofs4/expire.c
@@ -310,26 +310,29 @@ struct dentry *autofs4_expire_direct(struct super_block *sb,
 	now = jiffies;
 	timeout = sbi->exp_timeout;
 
-	spin_lock(&sbi->fs_lock);
-	ino = autofs4_dentry_ino(root);
-	/* No point expiring a pending mount */
-	if (ino->flags & AUTOFS_INF_PENDING)
-		goto out;
 	if (!autofs4_direct_busy(mnt, root, timeout, do_now)) {
+		spin_lock(&sbi->fs_lock);
+		ino = autofs4_dentry_ino(root);
+		/* No point expiring a pending mount */
+		if (ino->flags & AUTOFS_INF_PENDING) {
+			spin_unlock(&sbi->fs_lock);
+			goto out;
+		}
 		ino->flags |= AUTOFS_INF_WANT_EXPIRE;
 		spin_unlock(&sbi->fs_lock);
 		synchronize_rcu();
-		spin_lock(&sbi->fs_lock);
 		if (!autofs4_direct_busy(mnt, root, timeout, do_now)) {
+			spin_lock(&sbi->fs_lock);
 			ino->flags |= AUTOFS_INF_EXPIRING;
 			init_completion(&ino->expire_complete);
 			spin_unlock(&sbi->fs_lock);
 			return root;
 		}
+		spin_lock(&sbi->fs_lock);
 		ino->flags &= ~AUTOFS_INF_WANT_EXPIRE;
+		spin_unlock(&sbi->fs_lock);
 	}
 out:
-	spin_unlock(&sbi->fs_lock);
 	dput(root);
 
 	return NULL;

^ permalink raw reply related	[flat|nested] 19+ messages in thread

* [PATCH 7/7] vfs - make may_umount_tree() mount propogation aware
  2016-11-28  2:11 [PATCH 1/7] vfs - merge path_is_mountpoint() and path_is_mountpoint_rcu() Ian Kent
                   ` (4 preceding siblings ...)
  2016-11-28  2:12 ` [PATCH 6/7] autofs - dont hold spin lock over direct mount expire Ian Kent
@ 2016-11-28  2:12 ` Ian Kent
  2016-11-30 22:22 ` [PATCH 1/7] vfs - merge path_is_mountpoint() and path_is_mountpoint_rcu() Andrew Morton
  2016-12-03  5:13 ` Al Viro
  7 siblings, 0 replies; 19+ messages in thread
From: Ian Kent @ 2016-11-28  2:12 UTC (permalink / raw)
  To: Andrew Morton
  Cc: autofs mailing list, Kernel Mailing List, Eric W. Biederman,
	linux-fsdevel, Omar Sandoval, Al Viro

From: Ian Kent <ikent@redhat.com>

Now that autofs has namespace aware mounted checks the expire needs
changes to make it aware of mount propagation.

When checking for expiration may_umount_tree() checks only if the
given mount is in use. This leads to a callback to the automount
daemon to umount the mount which will fail if any propagated mounts
are in use.

To avoid this unnecessary call back may_umount_tree() needs to check
propagated mount trees also.

Signed-off-by: Ian Kent <raven@themaw.net>
Cc: Al Viro <viro@ZenIV.linux.org.uk>
Cc: Eric W. Biederman <ebiederm@xmission.com>
Cc: Omar Sandoval <osandov@osandov.com>
---
 fs/autofs4/expire.c |    4 +--
 fs/namespace.c      |   71 +++++++++++++++++++++++++++++++++++++++++++++------
 fs/pnode.c          |    3 +-
 fs/pnode.h          |    1 +
 4 files changed, 66 insertions(+), 13 deletions(-)

diff --git a/fs/autofs4/expire.c b/fs/autofs4/expire.c
index 57725d4..d44ae32 100644
--- a/fs/autofs4/expire.c
+++ b/fs/autofs4/expire.c
@@ -52,7 +52,7 @@ static int autofs4_mount_busy(struct vfsmount *mnt, struct dentry *dentry)
 			goto done;
 	}
 
-	/* Update the expiry counter if fs is busy */
+	/* Update the expiry counter if fs is busy in any namespace */
 	if (!may_umount_tree(path.mnt)) {
 		struct autofs_info *ino;
 
@@ -191,7 +191,7 @@ static int autofs4_direct_busy(struct vfsmount *mnt,
 {
 	pr_debug("top %p %pd\n", top, top);
 
-	/* If it's busy update the expiry counters */
+	/* If it's busy in any namespace update the expiry counters */
 	if (!may_umount_tree(mnt)) {
 		struct autofs_info *ino;
 
diff --git a/fs/namespace.c b/fs/namespace.c
index da1cd87..092d75c 100644
--- a/fs/namespace.c
+++ b/fs/namespace.c
@@ -1311,6 +1311,33 @@ const struct seq_operations mounts_op = {
 };
 #endif  /* CONFIG_PROC_FS */
 
+struct mnt_tree_refs {
+	struct mount *root;
+	unsigned int refs;
+	unsigned int min_refs;
+};
+
+static void mnt_get_tree_refs(struct mnt_tree_refs *mtr)
+{
+	struct mount *mnt = mtr->root;
+	struct mount *p;
+
+	/*
+	 * Each propagated tree contribues 2 * #mounts - 1 to
+	 * the minimal reference count. But when a mount is
+	 * umounted and connected the mount doesn't hold a
+	 * reference to its parent so it contributes a single
+	 * reference.
+	 */
+	for (p = mnt; p; p = next_mnt(p, mnt)) {
+		mtr->refs += mnt_get_count(p);
+		if (p == mnt || p->mnt.mnt_flags & MNT_UMOUNT)
+			mtr->min_refs++;
+		else
+			mtr->min_refs += 2;
+	}
+}
+
 /**
  * may_umount_tree - check if a mount tree is busy
  * @mnt: root of mount tree
@@ -1322,25 +1349,51 @@ const struct seq_operations mounts_op = {
 int may_umount_tree(struct vfsmount *m)
 {
 	struct mount *mnt = real_mount(m);
-	int actual_refs = 0;
-	int minimum_refs = 0;
-	struct mount *p;
+	struct mount *parent = mnt->mnt_parent;
+	struct mnt_tree_refs mtr;
+	struct mount *p, *child;
+
 	BUG_ON(!m);
 
-	/* write lock needed for mnt_get_count */
+	down_read(&namespace_sem);
 	lock_mount_hash();
-	for (p = mnt; p; p = next_mnt(p, mnt)) {
-		actual_refs += mnt_get_count(p);
-		minimum_refs += 2;
+
+	mtr.root = mnt;
+	mtr.refs = 0;
+	mtr.min_refs = 0;
+
+	mnt_get_tree_refs(&mtr);
+	/*
+	 * Caller holds a mount reference so minimum references
+	 * to the tree at mnt is one greater than the minumum
+	 * references.
+	 */
+	mtr.min_refs++;
+
+	/* The pnode.c propagation_next() function (as used below)
+	 * returns each mount propogated from a given mount. Using
+	 * the parent of mnt and matching the mnt->mnt_mountpoint
+	 * gets the list of mounts propogated from mnt. To work
+	 * out if the tree is in use (eg. open file or pwd) the
+	 * reference counts of each of these mounts needs to be
+	 * checked as well as mnt itself.
+	 */
+	for (p = propagation_next(parent, parent); p;
+			p = propagation_next(p, parent)) {
+		child = __lookup_mnt_last(&p->mnt, mnt->mnt_mountpoint);
+		if (child) {
+			mtr.root = child;
+			mnt_get_tree_refs(&mtr);
+		}
 	}
 	unlock_mount_hash();
+	up_read(&namespace_sem);
 
-	if (actual_refs > minimum_refs)
+	if (mtr.refs > mtr.min_refs)
 		return 0;
 
 	return 1;
 }
-
 EXPORT_SYMBOL(may_umount_tree);
 
 /**
diff --git a/fs/pnode.c b/fs/pnode.c
index 234a9ac..ae6f95e 100644
--- a/fs/pnode.c
+++ b/fs/pnode.c
@@ -143,8 +143,7 @@ void change_mnt_propagation(struct mount *mnt, int type)
  * vfsmount found while iterating with propagation_next() is
  * a peer of one we'd found earlier.
  */
-static struct mount *propagation_next(struct mount *m,
-					 struct mount *origin)
+struct mount *propagation_next(struct mount *m, struct mount *origin)
 {
 	/* are there any slaves of this mount? */
 	if (!IS_MNT_NEW(m) && !list_empty(&m->mnt_slave_list))
diff --git a/fs/pnode.h b/fs/pnode.h
index 550f5a8..2accd2d 100644
--- a/fs/pnode.h
+++ b/fs/pnode.h
@@ -38,6 +38,7 @@ static inline void set_mnt_shared(struct mount *mnt)
 	mnt->mnt.mnt_flags |= MNT_SHARED;
 }
 
+struct mount *propagation_next(struct mount *, struct mount *);
 void change_mnt_propagation(struct mount *, int);
 int propagate_mnt(struct mount *, struct mountpoint *, struct mount *,
 		struct hlist_head *);

^ permalink raw reply related	[flat|nested] 19+ messages in thread

* Re: [PATCH 1/7] vfs - merge path_is_mountpoint() and path_is_mountpoint_rcu()
  2016-11-28  2:11 [PATCH 1/7] vfs - merge path_is_mountpoint() and path_is_mountpoint_rcu() Ian Kent
                   ` (5 preceding siblings ...)
  2016-11-28  2:12 ` [PATCH 7/7] vfs - make may_umount_tree() mount propogation aware Ian Kent
@ 2016-11-30 22:22 ` Andrew Morton
  2016-12-01  0:13   ` Ian Kent
  2016-12-03  5:13 ` Al Viro
  7 siblings, 1 reply; 19+ messages in thread
From: Andrew Morton @ 2016-11-30 22:22 UTC (permalink / raw)
  To: Ian Kent
  Cc: autofs mailing list, Kernel Mailing List, Eric W. Biederman,
	linux-fsdevel, Omar Sandoval, Al Viro

So a far as I can tell, this patch series is intended to
address Al's review comments against the
http://lkml.kernel.org/r/20161011053352.27645.83962.stgit@pluto.themaw.net
series?

^ permalink raw reply	[flat|nested] 19+ messages in thread

* Re: [PATCH 1/7] vfs - merge path_is_mountpoint() and path_is_mountpoint_rcu()
  2016-11-30 22:22 ` [PATCH 1/7] vfs - merge path_is_mountpoint() and path_is_mountpoint_rcu() Andrew Morton
@ 2016-12-01  0:13   ` Ian Kent
  0 siblings, 0 replies; 19+ messages in thread
From: Ian Kent @ 2016-12-01  0:13 UTC (permalink / raw)
  To: Andrew Morton
  Cc: autofs mailing list, Kernel Mailing List, Eric W. Biederman,
	linux-fsdevel, Omar Sandoval, Al Viro

On Wed, 2016-11-30 at 14:22 -0800, Andrew Morton wrote:
> So a far as I can tell, this patch series is intended to
> address Al's review comments against the
> http://lkml.kernel.org/r/20161011053352.27645.83962.stgit@pluto.themaw.net
> series?

That's right and also to fix an additional problem I found in subsequent testing
(the may_umount_tree() changes).

Ian

^ permalink raw reply	[flat|nested] 19+ messages in thread

* Re: [PATCH 1/7] vfs - merge path_is_mountpoint() and path_is_mountpoint_rcu()
  2016-11-28  2:11 [PATCH 1/7] vfs - merge path_is_mountpoint() and path_is_mountpoint_rcu() Ian Kent
                   ` (6 preceding siblings ...)
  2016-11-30 22:22 ` [PATCH 1/7] vfs - merge path_is_mountpoint() and path_is_mountpoint_rcu() Andrew Morton
@ 2016-12-03  5:13 ` Al Viro
  2016-12-03 23:29   ` Al Viro
                     ` (2 more replies)
  7 siblings, 3 replies; 19+ messages in thread
From: Al Viro @ 2016-12-03  5:13 UTC (permalink / raw)
  To: Ian Kent
  Cc: Andrew Morton, autofs mailing list, Kernel Mailing List,
	Eric W. Biederman, linux-fsdevel, Omar Sandoval

	FWIW, I've folded that pile into vfs.git#work.autofs.

Problems:
	* (fixed) __path_is_mountpoint() should _not_ treat NULL from
__lookup_mnt() as "nothing's mounted there" until it has checked
that mount_lock hadn't been touched - mount --move on something unrelated
can race with lockless hash lookup and lead to false negatives.
	* linux/mount.h might be the wrong place for path_is_mountpoint().
Or it shouldn't be inlined.  I don't like the includes you've added there.
	* path_has_submounts() is broken.  At the very least, it's
AB-BA between mount_lock and rename_lock.  I would suggest trying to
put read_seqlock_excl(&mount_lock) around the call of d_walk() in there,
and using __lookup_mnt() in the callback (without retries on the mount_lock,
of course - read_seqlock_excl done on the outside is enough).  I'm not sure
if it won't cause trouble with contention, though; that needs testing.  As
it is, that function is broken in #work.autofs, same as it is in -mm and
-next.
	* the last one (propagation-related) is too ugly to live - at the
very least, its pieces should live in fs/pnode.c; exposing propagate_next()
is simply wrong.  I hadn't picked that one at all, and I would suggest
coordinating anything in that area with ebiederman - he has some work
around fs/pnode.c and you risk stepping on his toes.

^ permalink raw reply	[flat|nested] 19+ messages in thread

* Re: [PATCH 1/7] vfs - merge path_is_mountpoint() and path_is_mountpoint_rcu()
  2016-12-03  5:13 ` Al Viro
@ 2016-12-03 23:29   ` Al Viro
  2016-12-04  2:18     ` Ian Kent
  2016-12-04  2:07   ` Ian Kent
  2016-12-06  9:37   ` Ian Kent
  2 siblings, 1 reply; 19+ messages in thread
From: Al Viro @ 2016-12-03 23:29 UTC (permalink / raw)
  To: Ian Kent
  Cc: Andrew Morton, autofs mailing list, Kernel Mailing List,
	Eric W. Biederman, linux-fsdevel, Omar Sandoval

On Sat, Dec 03, 2016 at 05:13:22AM +0000, Al Viro wrote:
> 	* path_has_submounts() is broken.  At the very least, it's
> AB-BA between mount_lock and rename_lock.  I would suggest trying to
> put read_seqlock_excl(&mount_lock) around the call of d_walk() in there,
> and using __lookup_mnt() in the callback (without retries on the mount_lock,
> of course - read_seqlock_excl done on the outside is enough).  I'm not sure
> if it won't cause trouble with contention, though; that needs testing.  As
> it is, that function is broken in #work.autofs, same as it is in -mm and
> -next.

	Fix for path_has_submounts() (as above) force-pushed.  It does
need testing and profiling, obviously.

^ permalink raw reply	[flat|nested] 19+ messages in thread

* Re: [PATCH 1/7] vfs - merge path_is_mountpoint() and path_is_mountpoint_rcu()
  2016-12-03  5:13 ` Al Viro
  2016-12-03 23:29   ` Al Viro
@ 2016-12-04  2:07   ` Ian Kent
  2016-12-06  9:37   ` Ian Kent
  2 siblings, 0 replies; 19+ messages in thread
From: Ian Kent @ 2016-12-04  2:07 UTC (permalink / raw)
  To: Al Viro
  Cc: Andrew Morton, autofs mailing list, Kernel Mailing List,
	Eric W. Biederman, linux-fsdevel, Omar Sandoval

On Sat, 2016-12-03 at 05:13 +0000, Al Viro wrote:
> 	FWIW, I've folded that pile into vfs.git#work.autofs.
> 
> Problems:
> 	* (fixed) __path_is_mountpoint() should _not_ treat NULL from
> __lookup_mnt() as "nothing's mounted there" until it has checked
> that mount_lock hadn't been touched - mount --move on something unrelated
> can race with lockless hash lookup and lead to false negatives.

Right, looking at what you've done there the mistake is so obvious now!
Thanks for helping with it.

> 	* linux/mount.h might be the wrong place for path_is_mountpoint().
> Or it shouldn't be inlined.  I don't like the includes you've added there.
> 	* path_has_submounts() is broken.  At the very least, it's
> AB-BA between mount_lock and rename_lock.  I would suggest trying to
> put read_seqlock_excl(&mount_lock) around the call of d_walk() in there,
> and using __lookup_mnt() in the callback (without retries on the mount_lock,
> of course - read_seqlock_excl done on the outside is enough).  I'm not sure
> if it won't cause trouble with contention, though; that needs testing.  As
> it is, that function is broken in #work.autofs, same as it is in -mm and
> -next.

Umm ... that's a much more obvious dumb mistake and what you've done there
didn't occur to me even after you spelled it out, I'll take some time to digest
it. And thanks for that one too.

Ian

^ permalink raw reply	[flat|nested] 19+ messages in thread

* Re: [PATCH 1/7] vfs - merge path_is_mountpoint() and path_is_mountpoint_rcu()
  2016-12-03 23:29   ` Al Viro
@ 2016-12-04  2:18     ` Ian Kent
  2016-12-05  2:50       ` Ian Kent
  0 siblings, 1 reply; 19+ messages in thread
From: Ian Kent @ 2016-12-04  2:18 UTC (permalink / raw)
  To: Al Viro
  Cc: Andrew Morton, autofs mailing list, Kernel Mailing List,
	Eric W. Biederman, linux-fsdevel, Omar Sandoval

On Sat, 2016-12-03 at 23:29 +0000, Al Viro wrote:
> On Sat, Dec 03, 2016 at 05:13:22AM +0000, Al Viro wrote:
> > 
> > 	* path_has_submounts() is broken.  At the very least, it's
> > AB-BA between mount_lock and rename_lock.  I would suggest trying to
> > put read_seqlock_excl(&mount_lock) around the call of d_walk() in there,
> > and using __lookup_mnt() in the callback (without retries on the mount_lock,
> > of course - read_seqlock_excl done on the outside is enough).  I'm not sure
> > if it won't cause trouble with contention, though; that needs testing.  As
> > it is, that function is broken in #work.autofs, same as it is in -mm and
> > -next.
> 	Fix for path_has_submounts() (as above) force-pushed.  It does
> need testing and profiling, obviously.

I'll run my tests against it and re-run with oprofile if all goes well.

The submount-test I use should show contention if it's a problem but I'm not
sure the number of mounts used will be sufficient to show up scale problems.

Basically each case of the test (there are two) runs for 100 iterations using 10
processes with timing set to promote expire to mount contention, mainly to test
for expire to mount races.

If I don't see contention I might need to analyse further whether the test has
adequate coverage.

Ian

^ permalink raw reply	[flat|nested] 19+ messages in thread

* Re: [PATCH 1/7] vfs - merge path_is_mountpoint() and path_is_mountpoint_rcu()
  2016-12-04  2:18     ` Ian Kent
@ 2016-12-05  2:50       ` Ian Kent
  0 siblings, 0 replies; 19+ messages in thread
From: Ian Kent @ 2016-12-05  2:50 UTC (permalink / raw)
  To: Al Viro
  Cc: Andrew Morton, autofs mailing list, Kernel Mailing List,
	Eric W. Biederman, linux-fsdevel, Omar Sandoval

On Sun, 2016-12-04 at 10:18 +0800, Ian Kent wrote:
> On Sat, 2016-12-03 at 23:29 +0000, Al Viro wrote:
> > 
> > On Sat, Dec 03, 2016 at 05:13:22AM +0000, Al Viro wrote:
> > > 
> > > 
> > > 	* path_has_submounts() is broken.  At the very least, it's
> > > AB-BA between mount_lock and rename_lock.  I would suggest trying to
> > > put read_seqlock_excl(&mount_lock) around the call of d_walk() in there,
> > > and using __lookup_mnt() in the callback (without retries on the
> > > mount_lock,
> > > of course - read_seqlock_excl done on the outside is enough).  I'm not
> > > sure
> > > if it won't cause trouble with contention, though; that needs testing.  As
> > > it is, that function is broken in #work.autofs, same as it is in -mm and
> > > -next.
> > 	Fix for path_has_submounts() (as above) force-pushed.  It does
> > need testing and profiling, obviously.
> I'll run my tests against it and re-run with oprofile if all goes well.
> 
> The submount-test I use should show contention if it's a problem but I'm not
> sure the number of mounts used will be sufficient to show up scale problems.
> 
> Basically each case of the test (there are two) runs for 100 iterations using
> 10
> processes with timing set to promote expire to mount contention, mainly to
> test
> for expire to mount races.
> 
> If I don't see contention I might need to analyse further whether the test has
> adequate coverage.

I have run my usual tests on a build of vfs.get#work.autofs.

Both tests ran without problem multiple times (even though they should be
deterministic experience had shown they sometimes aren't).

I also did a system wide oprofile run of an additional run of the submount-test.

I hadn't noticed that the submount-test runs are shorter that I have come to
expect. This might be due to changes to the behaviour of the expire and mount
timing over time.  But I always check that I'm seeing expire and mount behaviour
that should lead to contention during the test run and that looked as expected.

The run time was about 55 minutes for each of the two cases I test whereas I had
come to expect a run time of around 70 minutes each. It's been quite a while
since I've actually paid attention to this and a lot has changed in the VFS
since.

It might be due to Neil Browns' changes to satisfy path walks in rcu-walk mode
where possible rather than always dropping into ref-walk mode as I didn't
profile those changes when they were implemented because I didn't notice
unexpectedly different run times when testing the changes.

I was going to talk about why the autofs usage of path_has_submounts() should
not be problematic but that would be tedious for everyone, instead I'll just say
that, clearly it is possible to abuse path_has_submounts() by calling it on
mount points that have a large number of directories, but autofs shouldn't do
that and the profile verifies this.

I'm not sure how accurate the profile is (I don't do it very often). There were
about 400000 out of 22000000 samples missed.

And hopefully the report output is readable enough to be useful after posting
....

Anyway, a system wide opreport (such as it is) showed this:

CPU: Intel Haswell microarchitecture, speed 3700 MHz (estimated)
Counted CPU_CLK_UNHALTED events (Clock cycles when not halted) with a unit mask of 0x00 (No unit mask) count 100000
samples  %        image name               app name                 symbol name
3897186  17.6585  libc-2.22.so             operf                    __strcmp_sse2_unaligned
3125714  14.1629  libstdc++.so.6.0.21      operf                    std::_Rb_tree_increment(std::_Rb_tree_node_base const*)
1500262   6.7978  libsqlite3.so.0.8.6      evolution                /usr/lib64/libsqlite3.so.0.8.6
856262    3.8798  operf                    operf                    /usr/bin/operf
749603    3.3965  libglib-2.0.so.0.4600.2  evolution                /usr/lib64/libglib-2.0.so.0.4600.2
560812    2.5411  libdbus-1.so.3.14.8      dbus-daemon              /usr/lib64/libdbus-1.so.3.14.8
378227    1.7138  systemd                  systemd                  /usr/lib/systemd/systemd
301175    1.3647  libcamel-1.2.so.54.0.0   evolution                /usr/lib64/libcamel-1.2.so.54.0.0
223545    1.0129  dbus-daemon              dbus-daemon              /usr/bin/dbus-daemon
187783    0.8509  libc-2.22.so             dbus-daemon              __strcmp_sse2_unaligned
157564    0.7139  libc-2.22.so             evolution                __strcmp_sse2_unaligned
157218    0.7124  libc-2.22.so             evolution                _int_malloc
156089    0.7073  libgobject-2.0.so.0.4600.2 evolution                /usr/lib64/libgobject-2.0.so.0.4600.2
116277    0.5269  libc-2.22.so             evolution                _int_free
116275    0.5269  libxul.so                firefox                  /usr/lib64/firefox/libxul.so
104278    0.4725  libc-2.22.so             evolution                __GI_____strtoull_l_internal
92937     0.4211  libc-2.22.so             ps                       _IO_vfscanf
...
101      4.6e-04  vmlinux-4.9.0-rc7        opendir                  path_is_mountpoint
...
23       1.0e-04  vmlinux-4.9.0-rc7        opendir                  path_has_submounts
...

where opendir is a program the test uses to trigger a mount and do various
checks on the result.

Not sure if this is enough or is what's needed, let me know if there's something
else specific I should do.

Ian

^ permalink raw reply	[flat|nested] 19+ messages in thread

* Re: [PATCH 1/7] vfs - merge path_is_mountpoint() and path_is_mountpoint_rcu()
  2016-12-03  5:13 ` Al Viro
  2016-12-03 23:29   ` Al Viro
  2016-12-04  2:07   ` Ian Kent
@ 2016-12-06  9:37   ` Ian Kent
  2016-12-07 21:30     ` Eric W. Biederman
  2 siblings, 1 reply; 19+ messages in thread
From: Ian Kent @ 2016-12-06  9:37 UTC (permalink / raw)
  To: Al Viro, Eric W. Biederman
  Cc: Andrew Morton, autofs mailing list, Kernel Mailing List,
	linux-fsdevel, Omar Sandoval

On Sat, 2016-12-03 at 05:13 +0000, Al Viro wrote:
> 	FWIW, I've folded that pile into vfs.git#work.autofs.
> 
> Problems:

snip ...

> 	* the last one (propagation-related) is too ugly to live - at the
> very least, its pieces should live in fs/pnode.c; exposing propagate_next()
> is simply wrong.  I hadn't picked that one at all, and I would suggest
> coordinating anything in that area with ebiederman - he has some work
> around fs/pnode.c and you risk stepping on his toes.

The earlier patches seem to be ok now so how about we talk a little about this
last one.

Eric, Al mentioned that you are working with fs/pnode.c and recommended I co-
ordinate with you.

So is my working on this this (which is most likely going to live in pnode.c if
I can can get something acceptable) going to cause complications for you?
Is what your doing at a point were it would be worth doing as Al suggests?

Anyway, the problem that this patch is supposed to solve is to check if any of
the list of mnt_mounts or any of the mounts propagated from each are in use.

One obvious problem with it is the propagation could be very large.

But now I look at it again there's no reason to have to every tree because if
one tree is busy then the the set of trees is busy. But every tree would be
visited if the not busy so it's perhaps still a problem.

The difficult thing is working out if a tree is busy, more so because there
could be a struct path holding references within any the trees so I don't know
of a simpler, more efficient way to check for this.

Anyone have any suggestions at all?
Ian

^ permalink raw reply	[flat|nested] 19+ messages in thread

* Re: [PATCH 1/7] vfs - merge path_is_mountpoint() and path_is_mountpoint_rcu()
  2016-12-06  9:37   ` Ian Kent
@ 2016-12-07 21:30     ` Eric W. Biederman
  2016-12-08  3:29       ` Ian Kent
  0 siblings, 1 reply; 19+ messages in thread
From: Eric W. Biederman @ 2016-12-07 21:30 UTC (permalink / raw)
  To: Ian Kent
  Cc: Al Viro, Andrew Morton, autofs mailing list, Kernel Mailing List,
	linux-fsdevel, Omar Sandoval

Ian Kent <raven@themaw.net> writes:

> On Sat, 2016-12-03 at 05:13 +0000, Al Viro wrote:
>> 	FWIW, I've folded that pile into vfs.git#work.autofs.
>> 
>> Problems:
>
> snip ...
>
>> 	* the last one (propagation-related) is too ugly to live - at the
>> very least, its pieces should live in fs/pnode.c; exposing propagate_next()
>> is simply wrong.  I hadn't picked that one at all, and I would suggest
>> coordinating anything in that area with ebiederman - he has some work
>> around fs/pnode.c and you risk stepping on his toes.
>
> The earlier patches seem to be ok now so how about we talk a little about this
> last one.
>
> Eric, Al mentioned that you are working with fs/pnode.c and recommended I co-
> ordinate with you.
>
> So is my working on this this (which is most likely going to live in pnode.c if
> I can can get something acceptable) going to cause complications for you?
> Is what your doing at a point were it would be worth doing as Al
> suggests?
>
> Anyway, the problem that this patch is supposed to solve is to check if any of
> the list of mnt_mounts or any of the mounts propagated from each are in use.
>
> One obvious problem with it is the propagation could be very large.
>
> But now I look at it again there's no reason to have to every tree because if
> one tree is busy then the the set of trees is busy. But every tree would be
> visited if the not busy so it's perhaps still a problem.
>
> The difficult thing is working out if a tree is busy, more so because there
> could be a struct path holding references within any the trees so I don't know
> of a simpler, more efficient way to check for this.

So coordination seems to be in order.  Not so much because of your
current implementation (which won't tell you what you want to know)
but because an implementation that tells you what you are looking for
has really bad > O(N^2) complexity walking the propagation tree in
the worst case.

To be correct you code would need to use next_mnt and walk the tree and
on each mount use propagate_mnt_busy to see if that entry can be
unmounted.  Possibly with small variations to match your case.  Mounts
in one part of the tree may propagate to places that mounts in other
parts of the tree will not.

I am assuming you are not worried about MNT_DETACH, as that case would
not need may_umount_tree at all.

I am researching how to make walking propagation for multiple mounts
efficient but it is a non-trivial problem.

> Anyone have any suggestions at all?

In the short term I recommend just not doing this, but if you want to
see if you can find an efficient algorithm with me, I am happy to bring
you up to speed on all of the gory details.

Eric

^ permalink raw reply	[flat|nested] 19+ messages in thread

* Re: [PATCH 1/7] vfs - merge path_is_mountpoint() and path_is_mountpoint_rcu()
  2016-12-07 21:30     ` Eric W. Biederman
@ 2016-12-08  3:29       ` Ian Kent
  2016-12-08  4:28         ` Eric W. Biederman
  0 siblings, 1 reply; 19+ messages in thread
From: Ian Kent @ 2016-12-08  3:29 UTC (permalink / raw)
  To: Eric W. Biederman
  Cc: Al Viro, Andrew Morton, autofs mailing list, Kernel Mailing List,
	linux-fsdevel, Omar Sandoval

On Thu, 2016-12-08 at 10:30 +1300, Eric W. Biederman wrote:
> Ian Kent <raven@themaw.net> writes:
> 
> > On Sat, 2016-12-03 at 05:13 +0000, Al Viro wrote:
> > > 	FWIW, I've folded that pile into vfs.git#work.autofs.
> > > 
> > > Problems:
> > 
> > snip ...
> > 
> > > 	* the last one (propagation-related) is too ugly to live - at the
> > > very least, its pieces should live in fs/pnode.c; exposing
> > > propagate_next()
> > > is simply wrong.  I hadn't picked that one at all, and I would suggest
> > > coordinating anything in that area with ebiederman - he has some work
> > > around fs/pnode.c and you risk stepping on his toes.
> > 
> > The earlier patches seem to be ok now so how about we talk a little about
> > this
> > last one.
> > 
> > Eric, Al mentioned that you are working with fs/pnode.c and recommended I
> > co-
> > ordinate with you.
> > 
> > So is my working on this this (which is most likely going to live in pnode.c
> > if
> > I can can get something acceptable) going to cause complications for you?
> > Is what your doing at a point were it would be worth doing as Al
> > suggests?
> > 
> > Anyway, the problem that this patch is supposed to solve is to check if any
> > of
> > the list of mnt_mounts or any of the mounts propagated from each are in use.
> > 
> > One obvious problem with it is the propagation could be very large.
> > 
> > But now I look at it again there's no reason to have to every tree because
> > if
> > one tree is busy then the the set of trees is busy. But every tree would be
> > visited if the not busy so it's perhaps still a problem.
> > 
> > The difficult thing is working out if a tree is busy, more so because there
> > could be a struct path holding references within any the trees so I don't
> > know
> > of a simpler, more efficient way to check for this.
> 
> So coordination seems to be in order.  Not so much because of your
> current implementation (which won't tell you what you want to know)

Umm ... ok I've missed something then because the patch I posted does appear to
get the calculation right. Perhaps I've missed a case where it gets it wrong
....

But now I'm looking deeper into it I'm beginning to wonder why it worked for one
of the cases. Maybe I need to do some more tests with even more printks. 

> but because an implementation that tells you what you are looking for
> has really bad > O(N^2) complexity walking the propagation tree in
> the worst case.

Yes it is bad indeed.

> 
> To be correct you code would need to use next_mnt and walk the tree and
> on each mount use propagate_mnt_busy to see if that entry can be
> unmounted.  Possibly with small variations to match your case.  Mounts
> in one part of the tree may propagate to places that mounts in other
> parts of the tree will not.

Right, the point there being use propagate_mnt_busy() for the check.

I tried to use that when I started this but had trouble, I'll have another look
at using it.

I thought the reason I couldn't use propagate_mnt_busy() is because it will see
any mount with submounts as busy and that's not what's need. It's mounts below
each of mounts having submounts that make them busy in my case.

You probably don't want to read about this but, unfortunately, an example is
possibly the best way to describe what I need to achieve.

A simple example for is the autofs direct mount map entry (a so called autofs
multi-mount):

/absolute/path/to/direct/mount-point \
    /offset/path/one      server:/export/path/one \
    /offset2/path/two     server2:/export/path/other

The path /absolute/path/to/direct/mount-point is an autofs direct mount trigger
and is essentially an autofs mount.

When the mount is triggered each of the offsets, /offset/path/one and
/offset2/path/two offset trigger mounts are mounted so they can trigger mounts
independently.

When the direct mount /absolute/path/to/direct/mount-point is expired the two
offsets need to be umounted if they are not busy so
/absolute/path/to/direct/mount-point having submounts doesn't necessarily make
it unable to be umounted.

But this is (supposed) to be for only to one level of mounts, for example if I
had:

/absolute/path/to/direct/mount-point \
    /offset/path/one        server:/export/path/one \
    /offset2/path/two       server2:/export/path/other \
    /offset/path/one/nested server3:/export/path3/nested

then the the offsets below the nesting point /offset/path/one make it busy and
need to be expired first.

So why would I even need to do this?

It's functionality of Sun autofs maps and that's the primary map format autofs
supports but that's why it's needed and not why I do it this way.

Another example of one these multi-mounts is:

/absolute/path/to/direct/mount-point \
    /                     servern:/another/export \
    /offset/path/one      server:/export/path/one \
    /offset2/path/two     server2:/export/path/other

where an NFS mount is done on the root of the offset tree (similar to the case
where nesting is present in the example map entry above).

Once that happens autofs can't get a callback to mount offsets unless there are
offset triggers mounted to trigger the mounts.

> 
> I am assuming you are not worried about MNT_DETACH, as that case would
> not need may_umount_tree at all.

I'm not. 

> 
> I am researching how to make walking propagation for multiple mounts
> efficient but it is a non-trivial problem.

Sure is.

> 
> > Anyone have any suggestions at all?
> 
> In the short term I recommend just not doing this, but if you want to
> see if you can find an efficient algorithm with me, I am happy to bring
> you up to speed on all of the gory details.

I need to do this to make autofs play better in the presence of namespaces and
that's a problem now and is long overdue to be resolved.

So I'm happy to do whatever I can to work toward that.

I could leave this part of the implementation until later because the false
positive this solves leads to an expire fail and that is (must be) handled
properly by the user space daemon.

But when I first noticed the false positive the expire failure was handled ok by
the daemon (AFAICS) but there was what looked like a reference counting problem
(but not quite that either, odd) which I was going to return to later.

Maybe I've stumbled onto a subtle propagation bug that really needs fixing ....

Ian

^ permalink raw reply	[flat|nested] 19+ messages in thread

* Re: [PATCH 1/7] vfs - merge path_is_mountpoint() and path_is_mountpoint_rcu()
  2016-12-08  3:29       ` Ian Kent
@ 2016-12-08  4:28         ` Eric W. Biederman
  2016-12-08  6:18           ` Ian Kent
  0 siblings, 1 reply; 19+ messages in thread
From: Eric W. Biederman @ 2016-12-08  4:28 UTC (permalink / raw)
  To: Ian Kent
  Cc: Al Viro, Andrew Morton, autofs mailing list, Kernel Mailing List,
	linux-fsdevel, Omar Sandoval

Ian Kent <raven@themaw.net> writes:

> On Thu, 2016-12-08 at 10:30 +1300, Eric W. Biederman wrote:
>> Ian Kent <raven@themaw.net> writes:
>> 
>> > On Sat, 2016-12-03 at 05:13 +0000, Al Viro wrote:
>> > > 	FWIW, I've folded that pile into vfs.git#work.autofs.
>> > > 
>> > > Problems:
>> > 
>> > snip ...
>> > 
>> > > 	* the last one (propagation-related) is too ugly to live - at the
>> > > very least, its pieces should live in fs/pnode.c; exposing
>> > > propagate_next()
>> > > is simply wrong.  I hadn't picked that one at all, and I would suggest
>> > > coordinating anything in that area with ebiederman - he has some work
>> > > around fs/pnode.c and you risk stepping on his toes.
>> > 
>> > The earlier patches seem to be ok now so how about we talk a little about
>> > this
>> > last one.
>> > 
>> > Eric, Al mentioned that you are working with fs/pnode.c and recommended I
>> > co-
>> > ordinate with you.
>> > 
>> > So is my working on this this (which is most likely going to live in pnode.c
>> > if
>> > I can can get something acceptable) going to cause complications for you?
>> > Is what your doing at a point were it would be worth doing as Al
>> > suggests?
>> > 
>> > Anyway, the problem that this patch is supposed to solve is to check if any
>> > of
>> > the list of mnt_mounts or any of the mounts propagated from each are in use.
>> > 
>> > One obvious problem with it is the propagation could be very large.
>> > 
>> > But now I look at it again there's no reason to have to every tree because
>> > if
>> > one tree is busy then the the set of trees is busy. But every tree would be
>> > visited if the not busy so it's perhaps still a problem.
>> > 
>> > The difficult thing is working out if a tree is busy, more so because there
>> > could be a struct path holding references within any the trees so I don't
>> > know
>> > of a simpler, more efficient way to check for this.
>> 
>> So coordination seems to be in order.  Not so much because of your
>> current implementation (which won't tell you what you want to know)
>
> Umm ... ok I've missed something then because the patch I posted does appear to
> get the calculation right. Perhaps I've missed a case where it gets it wrong
> ....
>
> But now I'm looking deeper into it I'm beginning to wonder why it worked for one
> of the cases. Maybe I need to do some more tests with even more
> printks.

So the case that I am concerned about is that if someone happens to do
mount --bind the mount propagation trees would not just be mirror images
in single filesystems but have leaves in odd places.

Consider .../base/one/two (where one and two are automounts) and base
is the shared mountpoint that is propagated between namespaces.

If someone does mount --bind .../base/one ../somepath/one in any
namespace then there will be places where an unmount of "two" will
propagate to, but that an unmount of "one" won't as their respective
propagation trees are different.

Not accounting for different mount points having different propagation
trees is what I meant when I said your code was wrong.

>> but because an implementation that tells you what you are looking for
>> has really bad > O(N^2) complexity walking the propagation tree in
>> the worst case.
>
> Yes it is bad indeed.
>
>> 
>> To be correct you code would need to use next_mnt and walk the tree and
>> on each mount use propagate_mnt_busy to see if that entry can be
>> unmounted.  Possibly with small variations to match your case.  Mounts
>> in one part of the tree may propagate to places that mounts in other
>> parts of the tree will not.
>
> Right, the point there being use propagate_mnt_busy() for the check.

Or a variant of propagate_mnt_busy.

> I tried to use that when I started this but had trouble, I'll have another look
> at using it.
>
> I thought the reason I couldn't use propagate_mnt_busy() is because it will see
> any mount with submounts as busy and that's not what's need. It's mounts below
> each of mounts having submounts that make them busy in my case.

If you have the count of submounts passed into propagate_mnt_busy() it
will come very close to what you need.  It is still possible to have
false positives in the face of propagation slaves that have had some of
your autofs mounts unmounted, and something else mounted upon them.

If all you need is a better approximation something like your current
code with comments about it's limitations might even be reasonable.

> You probably don't want to read about this but, unfortunately, an example is
> possibly the best way to describe what I need to achieve.

[snip good example]

>> > Anyone have any suggestions at all?
>> 
>> In the short term I recommend just not doing this, but if you want to
>> see if you can find an efficient algorithm with me, I am happy to bring
>> you up to speed on all of the gory details.
>
> I need to do this to make autofs play better in the presence of namespaces and
> that's a problem now and is long overdue to be resolved.
>
> So I'm happy to do whatever I can to work toward that.
>
> I could leave this part of the implementation until later because the false
> positive this solves leads to an expire fail and that is (must be) handled
> properly by the user space daemon.
>
> But when I first noticed the false positive the expire failure was handled ok by
> the daemon (AFAICS) but there was what looked like a reference counting problem
> (but not quite that either, odd) which I was going to return to later.
>
> Maybe I've stumbled onto a subtle propagation bug that really needs
> fixing ....

MNT_DETACH has worst case performance issues when a tree of mounts is
unmounted that would really be nice to fix, as it can propogate pretty
horrible.  You are trying to do something very similar to MNT_DETACH so
an efficient solution for one is likely an efficient solution for the
other.


Eric

^ permalink raw reply	[flat|nested] 19+ messages in thread

* Re: [PATCH 1/7] vfs - merge path_is_mountpoint() and path_is_mountpoint_rcu()
  2016-12-08  4:28         ` Eric W. Biederman
@ 2016-12-08  6:18           ` Ian Kent
  0 siblings, 0 replies; 19+ messages in thread
From: Ian Kent @ 2016-12-08  6:18 UTC (permalink / raw)
  To: Eric W. Biederman
  Cc: Al Viro, Andrew Morton, autofs mailing list, Kernel Mailing List,
	linux-fsdevel, Omar Sandoval

On Thu, 2016-12-08 at 17:28 +1300, Eric W. Biederman wrote:
> Ian Kent <raven@themaw.net> writes:
> 
> > On Thu, 2016-12-08 at 10:30 +1300, Eric W. Biederman wrote:
> > > Ian Kent <raven@themaw.net> writes:
> > > 
> > > > On Sat, 2016-12-03 at 05:13 +0000, Al Viro wrote:
> > > > > 	FWIW, I've folded that pile into vfs.git#work.autofs.
> > > > > 
> > > > > Problems:
> > > > 
> > > > snip ...
> > > > 
> > > > > 	* the last one (propagation-related) is too ugly to live - at
> > > > > the
> > > > > very least, its pieces should live in fs/pnode.c; exposing
> > > > > propagate_next()
> > > > > is simply wrong.  I hadn't picked that one at all, and I would suggest
> > > > > coordinating anything in that area with ebiederman - he has some work
> > > > > around fs/pnode.c and you risk stepping on his toes.
> > > > 
> > > > The earlier patches seem to be ok now so how about we talk a little
> > > > about
> > > > this
> > > > last one.
> > > > 
> > > > Eric, Al mentioned that you are working with fs/pnode.c and recommended
> > > > I
> > > > co-
> > > > ordinate with you.
> > > > 
> > > > So is my working on this this (which is most likely going to live in
> > > > pnode.c
> > > > if
> > > > I can can get something acceptable) going to cause complications for
> > > > you?
> > > > Is what your doing at a point were it would be worth doing as Al
> > > > suggests?
> > > > 
> > > > Anyway, the problem that this patch is supposed to solve is to check if
> > > > any
> > > > of
> > > > the list of mnt_mounts or any of the mounts propagated from each are in
> > > > use.
> > > > 
> > > > One obvious problem with it is the propagation could be very large.
> > > > 
> > > > But now I look at it again there's no reason to have to every tree
> > > > because
> > > > if
> > > > one tree is busy then the the set of trees is busy. But every tree would
> > > > be
> > > > visited if the not busy so it's perhaps still a problem.
> > > > 
> > > > The difficult thing is working out if a tree is busy, more so because
> > > > there
> > > > could be a struct path holding references within any the trees so I
> > > > don't
> > > > know
> > > > of a simpler, more efficient way to check for this.
> > > 
> > > So coordination seems to be in order.  Not so much because of your
> > > current implementation (which won't tell you what you want to know)
> > 
> > Umm ... ok I've missed something then because the patch I posted does appear
> > to
> > get the calculation right. Perhaps I've missed a case where it gets it wrong
> > ....
> > 
> > But now I'm looking deeper into it I'm beginning to wonder why it worked for
> > one
> > of the cases. Maybe I need to do some more tests with even more
> > printks.
> 
> So the case that I am concerned about is that if someone happens to do
> mount --bind the mount propagation trees would not just be mirror images
> in single filesystems but have leaves in odd places.
> 
> Consider .../base/one/two (where one and two are automounts) and base
> is the shared mountpoint that is propagated between namespaces.
> 
> If someone does mount --bind .../base/one ../somepath/one in any
> namespace then there will be places where an unmount of "two" will
> propagate to, but that an unmount of "one" won't as their respective
> propagation trees are different.
> 
> Not accounting for different mount points having different propagation
> trees is what I meant when I said your code was wrong.

Yeah, it's all too easy for me to miss important cases like this because such
things are not allowed (or rather not supported, since it can be done) within
automount managed directories. Even without propagation it can be problematic.

But you're right, that's no excuse for a VFS function to not cater for, or at
least handle sensibly, cases like this.

> 
> > > but because an implementation that tells you what you are looking for
> > > has really bad > O(N^2) complexity walking the propagation tree in
> > > the worst case.
> > 
> > Yes it is bad indeed.
> > 
> > > 
> > > To be correct you code would need to use next_mnt and walk the tree and
> > > on each mount use propagate_mnt_busy to see if that entry can be
> > > unmounted.  Possibly with small variations to match your case.  Mounts
> > > in one part of the tree may propagate to places that mounts in other
> > > parts of the tree will not.
> > 
> > Right, the point there being use propagate_mnt_busy() for the check.
> 
> Or a variant of propagate_mnt_busy.
> 
> > I tried to use that when I started this but had trouble, I'll have another
> > look
> > at using it.
> > 
> > I thought the reason I couldn't use propagate_mnt_busy() is because it will
> > see
> > any mount with submounts as busy and that's not what's need. It's mounts
> > below
> > each of mounts having submounts that make them busy in my case.
> 
> If you have the count of submounts passed into propagate_mnt_busy() it
> will come very close to what you need.  It is still possible to have
> false positives in the face of propagation slaves that have had some of
> your autofs mounts unmounted, and something else mounted upon them.

That shouldn't be done within an automount managed mount even though there's no
way to for the autofs module to veto such mounts and the daemon would probably
handle a good number of cases of it.

The justification being that automount managed mounts are defined by maps that
refer to specific paths which are specifically what the administrator wishes to
provide.

So, strictly speaking, passing an autofs mount point to a container with a
volume option should use the same path as the automount managed directory
although it isn't (can't be) enforced and works ok, it's wrong in principle.

Still, this is also an aside from the fact that the cases you site must be
handled by general kernel code.

> 
> If all you need is a better approximation something like your current
> code with comments about it's limitations might even be reasonable.

Maybe but I worry about the propagation list becoming very large which is likely
for some larger autofs users. So I really do need to worry about these cases.

I was aware of this problem with the initial patch but really needed a starting
point for discussion.

> 
> > You probably don't want to read about this but, unfortunately, an example is
> > possibly the best way to describe what I need to achieve.
> 
> [snip good example]
> 
> > > > Anyone have any suggestions at all?
> > > 
> > > In the short term I recommend just not doing this, but if you want to
> > > see if you can find an efficient algorithm with me, I am happy to bring
> > > you up to speed on all of the gory details.
> > 
> > I need to do this to make autofs play better in the presence of namespaces
> > and
> > that's a problem now and is long overdue to be resolved.
> > 
> > So I'm happy to do whatever I can to work toward that.
> > 
> > I could leave this part of the implementation until later because the false
> > positive this solves leads to an expire fail and that is (must be) handled
> > properly by the user space daemon.
> > 
> > But when I first noticed the false positive the expire failure was handled
> > ok by
> > the daemon (AFAICS) but there was what looked like a reference counting
> > problem
> > (but not quite that either, odd) which I was going to return to later.
> > 
> > Maybe I've stumbled onto a subtle propagation bug that really needs
> > fixing ....
> 
> MNT_DETACH has worst case performance issues when a tree of mounts is
> unmounted that would really be nice to fix, as it can propogate pretty
> horrible.  You are trying to do something very similar to MNT_DETACH so
> an efficient solution for one is likely an efficient solution for the
> other.

Let me digest that for a while.

Thanks
Ian

^ permalink raw reply	[flat|nested] 19+ messages in thread

end of thread, other threads:[~2016-12-08  6:18 UTC | newest]

Thread overview: 19+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2016-11-28  2:11 [PATCH 1/7] vfs - merge path_is_mountpoint() and path_is_mountpoint_rcu() Ian Kent
2016-11-28  2:11 ` [PATCH 2/7] autofs - make struct path const in autofs4_dir_open() Ian Kent
2016-11-28  2:11 ` [PATCH 3/7] autofs - change struct path to const in autofs4_expire_wait() and autofs4_wait() Ian Kent
2016-11-28  2:12 ` [PATCH 4/7] vfs - change struct path to const in d_manage() Ian Kent
2016-11-28  2:12 ` [PATCH 5/7] vfs - constify path parameter of path_has_submounts() Ian Kent
2016-11-28  2:12 ` [PATCH 6/7] autofs - dont hold spin lock over direct mount expire Ian Kent
2016-11-28  2:12 ` [PATCH 7/7] vfs - make may_umount_tree() mount propogation aware Ian Kent
2016-11-30 22:22 ` [PATCH 1/7] vfs - merge path_is_mountpoint() and path_is_mountpoint_rcu() Andrew Morton
2016-12-01  0:13   ` Ian Kent
2016-12-03  5:13 ` Al Viro
2016-12-03 23:29   ` Al Viro
2016-12-04  2:18     ` Ian Kent
2016-12-05  2:50       ` Ian Kent
2016-12-04  2:07   ` Ian Kent
2016-12-06  9:37   ` Ian Kent
2016-12-07 21:30     ` Eric W. Biederman
2016-12-08  3:29       ` Ian Kent
2016-12-08  4:28         ` Eric W. Biederman
2016-12-08  6:18           ` Ian Kent

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).