Re: [ANNOUNCE] autofs 5.1.2 release

2017-12-19 Thread Ian Kent
On 20/12/17 13:52, Ian Kent wrote: > On 20/12/17 11:29, NeilBrown wrote: >> >> Hi Ian, >> I've been looking at: >> >>> - add configuration option to use fqdn in mounts. >> >> (commit 9aeef772604) because using this new option causes a r

Re: [ANNOUNCE] autofs 5.1.2 release

2017-12-19 Thread Ian Kent
On 20/12/17 14:10, Ian Kent wrote: > On 20/12/17 13:52, Ian Kent wrote: >> On 20/12/17 11:29, NeilBrown wrote: >>> >>> Hi Ian, >>> I've been looking at: >>> >>>> - add configuration option to use fqdn in mounts. >>> >

Re: [ANNOUNCE] autofs 5.1.2 release

2017-12-19 Thread Ian Kent
On 20/12/17 13:52, Ian Kent wrote: > On 20/12/17 11:29, NeilBrown wrote: >> >> Hi Ian, >> I've been looking at: >> >>> - add configuration option to use fqdn in mounts. >> >> (commit 9aeef772604) because using this new option causes a r

Re: [ANNOUNCE] autofs 5.1.2 release

2017-12-19 Thread Ian Kent
On 20/12/17 11:29, NeilBrown wrote: > > Hi Ian, > I've been looking at: > >> - add configuration option to use fqdn in mounts. > > (commit 9aeef772604) because using this new option causes a regression. > If you are using the "replicated server" functionality, then > use_hostname_for_mounts =

Re: [ANNOUNCE] autofs 5.1.4 release

2017-12-19 Thread Ian Kent
On 19/12/17 17:45, Patrick Goetz wrote: > On 12/19/2017 02:29 AM, Ian Kent wrote: >> A new amd mount type has been added. The amd mount type "program" >> has been added which allows a user provided program to be given >> in a map entry that will be used for perform

[ANNOUNCE] autofs 5.1.4 release

2017-12-19 Thread Ian Kent
Hi all, It's finally time for a release, autofs-5.1.4. Unfortunately there were a couple of annoying regressions in 5.1.3. I believe they have been resolved in this release. Also, the startup retry on the master map not available logic has been improved so that should function properly now and

Re: [PATCH 0/2] userns: automount cleanups

2017-11-30 Thread Ian Kent
On 30/11/17 13:21, Eric W. Biederman wrote: > Ian Kent writes: > >> On 30/11/17 08:01, Eric W. Biederman wrote: >>> >>> While reviewing some code I realized that in getting d_automount working >>> with s_user_ns I had left behind some unnecessary reli

Re: [PATCH 0/2] userns: automount cleanups

2017-11-29 Thread Ian Kent
On 30/11/17 08:01, Eric W. Biederman wrote: > > While reviewing some code I realized that in getting d_automount working > with s_user_ns I had left behind some unnecessary relics of the blind > path I started down. Here are two patches that remove those relics. > > Unless someone has another pr

Re: [PATCH 3/3] autofs - fix AT_NO_AUTOMOUNT not being honored

2017-11-29 Thread Ian Kent
On 29/11/17 15:39, NeilBrown wrote: > On Wed, Nov 29 2017, Ian Kent wrote: > >> On 29/11/17 11:45, NeilBrown wrote: >>> On Wed, Nov 29 2017, Ian Kent wrote: >>> >>>> Adding Al Viro to the Cc list as I believe Stephen Whitehouse and >>>> Al

Re: [PATCH 3/3] autofs - fix AT_NO_AUTOMOUNT not being honored

2017-11-28 Thread Ian Kent
On 29/11/17 11:45, NeilBrown wrote: > On Wed, Nov 29 2017, Ian Kent wrote: > >> Adding Al Viro to the Cc list as I believe Stephen Whitehouse and >> Al have discussed something similar, please feel free to chime in >> with your thoughts Al. >> >> On 29/11/1

Re: [PATCH 3/3] autofs - fix AT_NO_AUTOMOUNT not being honored

2017-11-28 Thread Ian Kent
On 29/11/17 10:48, NeilBrown wrote: > On Wed, Nov 29 2017, Ian Kent wrote: > >> On 29/11/17 10:13, Mike Marion wrote: >>> On Wed, Nov 29, 2017 at 12:17:27PM +1100, NeilBrown wrote: >>> >>>> How big do people see /proc/self/mount* getting? What size

Re: [PATCH 3/3] autofs - fix AT_NO_AUTOMOUNT not being honored

2017-11-28 Thread Ian Kent
Adding Al Viro to the Cc list as I believe Stephen Whitehouse and Al have discussed something similar, please feel free to chime in with your thoughts Al. On 29/11/17 09:17, NeilBrown wrote: > On Tue, Nov 28 2017, Mike Marion wrote: > >> On Tue, Nov 28, 2017 at 07:43:05AM +0800, Ia

Re: [PATCH 3/3] autofs - fix AT_NO_AUTOMOUNT not being honored

2017-11-28 Thread Ian Kent
On 29/11/17 10:13, Mike Marion wrote: > On Wed, Nov 29, 2017 at 12:17:27PM +1100, NeilBrown wrote: > >> How big do people see /proc/self/mount* getting? What size reads >> does 'strace' show the various programs using to read it? > > We already have line counts into 5 figures. This wasn't an is

Re: [PATCH 3/3] autofs - fix AT_NO_AUTOMOUNT not being honored

2017-11-27 Thread Ian Kent
On 28/11/17 00:01, Mike Marion wrote: > On Thu, Nov 23, 2017 at 08:36:49AM +0800, Ian Kent wrote: > >> And with the move of userspace to use /proc based mount tables (one >> example being the symlink of /etc/mtab into /proc) even modest sized >> direct mount maps will

[PATCH 2/2] autofs: revert fix AT_NO_AUTOMOUNT not being honored

2017-11-26 Thread Ian Kent
modifications. So that will be done instead and the autofs module documentation updated with a description of the problem and what needs to be done by module users for this specific case. Reverts: 42f4614821 Signed-off-by: Ian Kent Cc: Neil Brown Cc: Al Viro Cc: David Howells Cc: Colin Walters

[PATCH 1/2] autofs: revert take more care to not update last_used on path walk

2017-11-26 Thread Ian Kent
the patch being reverted introduces a regression which should be fixed. Reverts: 092a53452b Signed-off-by: Ian Kent Cc: Neil Brown Cc: Al Viro --- fs/autofs4/root.c | 17 ++--- 1 file changed, 6 insertions(+), 11 deletions(-) diff --git a/fs/autofs4/root.c b/fs/autofs4/root.c

Re: [PATCH 3/3] autofs - fix AT_NO_AUTOMOUNT not being honored

2017-11-22 Thread Ian Kent
On 23/11/17 12:49, NeilBrown wrote: > On Thu, Nov 23 2017, Ian Kent wrote: > >> On 23/11/17 10:21, NeilBrown wrote: >>> On Thu, Nov 23 2017, Ian Kent wrote: >>> >>>> >>>> Hey Neil, I'm looking at this again because RH QE have complained

Re: [PATCH 3/3] autofs - fix AT_NO_AUTOMOUNT not being honored

2017-11-22 Thread Ian Kent
On 23/11/17 11:04, NeilBrown wrote: > On Thu, Nov 23 2017, Ian Kent wrote: > >> On 23/11/17 08:47, NeilBrown wrote: >>> On Wed, Nov 22 2017, Ian Kent wrote: >>> >>>> On 21/11/17 09:53, NeilBrown wrote: >>>>> On Wed, May 10 2017, Ian Kent

Re: [PATCH 3/3] autofs - fix AT_NO_AUTOMOUNT not being honored

2017-11-22 Thread Ian Kent
On 23/11/17 10:46, Ian Kent wrote: > On 23/11/17 10:21, NeilBrown wrote: >> On Thu, Nov 23 2017, Ian Kent wrote: >> >>> >>> Hey Neil, I'm looking at this again because RH QE have complained about >>> a regression test failing with a kernel that has

Re: [PATCH 3/3] autofs - fix AT_NO_AUTOMOUNT not being honored

2017-11-22 Thread Ian Kent
On 23/11/17 10:21, NeilBrown wrote: > On Thu, Nov 23 2017, Ian Kent wrote: > >> >> Hey Neil, I'm looking at this again because RH QE have complained about >> a regression test failing with a kernel that has this change. >> >> Maybe I'm just dumb but

Re: [PATCH 3/3] autofs - fix AT_NO_AUTOMOUNT not being honored

2017-11-22 Thread Ian Kent
On 23/11/17 09:43, Ian Kent wrote: > On 23/11/17 08:47, NeilBrown wrote: >> On Wed, Nov 22 2017, Ian Kent wrote: >> >>> On 21/11/17 09:53, NeilBrown wrote: >>>> On Wed, May 10 2017, Ian Kent wrote: >>>> >>>>> The fstatat(2) and statx

Re: [PATCH 3/3] autofs - fix AT_NO_AUTOMOUNT not being honored

2017-11-22 Thread Ian Kent
On 23/11/17 08:47, NeilBrown wrote: > On Wed, Nov 22 2017, Ian Kent wrote: > >> On 21/11/17 09:53, NeilBrown wrote: >>> On Wed, May 10 2017, Ian Kent wrote: >>> >>>> The fstatat(2) and statx() calls can pass the flag AT_NO_AUTOMOUNT >>>>

Re: [PATCH 3/3] autofs - fix AT_NO_AUTOMOUNT not being honored

2017-11-22 Thread Ian Kent
On 22/11/17 12:28, Ian Kent wrote: > On 21/11/17 09:53, NeilBrown wrote: >> On Wed, May 10 2017, Ian Kent wrote: >> >>> The fstatat(2) and statx() calls can pass the flag AT_NO_AUTOMOUNT >>> which is meant to clear the LOOKUP_AUTOMOUNT flag and prevent triggerin

Re: [PATCH 3/3] autofs - fix AT_NO_AUTOMOUNT not being honored

2017-11-21 Thread Ian Kent
On 21/11/17 09:53, NeilBrown wrote: > On Wed, May 10 2017, Ian Kent wrote: > >> The fstatat(2) and statx() calls can pass the flag AT_NO_AUTOMOUNT >> which is meant to clear the LOOKUP_AUTOMOUNT flag and prevent triggering >> of an automount by the call. But this flag is

Re: [PATCH] autofs: don't fail mount for transient error

2017-11-03 Thread Ian Kent
On 03/11/17 09:40, NeilBrown wrote: > Hi Neil, and thanks taking the time to post the patch. > Currently if the autofs kernel module gets an error when > writing to the pipe which links to the daemon, then it > marks the whole moutpoint as catatonic, and it will stop working. > > It is possible

Re: [RFC PATCH 1/2] autofs: set compat flag on sbi when daemon uses 32bit addressation

2017-09-14 Thread Ian Kent
On 14/09/17 19:39, Stanislav Kinsburskiy wrote: > > > 14.09.2017 13:29, Ian Kent пишет: >> On 14/09/17 17:24, Stanislav Kinsburskiy wrote: >>> >>> >>> 14.09.2017 02:38, Ian Kent пишет: >>>> On 01/09/17 19:21, Stanislav Kinsbur

Re: [RFC PATCH 1/2] autofs: set compat flag on sbi when daemon uses 32bit addressation

2017-09-14 Thread Ian Kent
On 14/09/17 17:24, Stanislav Kinsburskiy wrote: > > > 14.09.2017 02:38, Ian Kent пишет: >> On 01/09/17 19:21, Stanislav Kinsburskiy wrote: >>> Signed-off-by: Stanislav Kinsburskiy >>> --- >>> fs/autofs4/autofs_i.h |3 +++ >>> fs/aut

Re: [RFC PATCH 1/2] autofs: set compat flag on sbi when daemon uses 32bit addressation

2017-09-13 Thread Ian Kent
On 01/09/17 19:21, Stanislav Kinsburskiy wrote: > Signed-off-by: Stanislav Kinsburskiy > --- > fs/autofs4/autofs_i.h |3 +++ > fs/autofs4/dev-ioctl.c |3 +++ > fs/autofs4/inode.c |4 +++- > 3 files changed, 9 insertions(+), 1 deletion(-) > > diff --git a/fs/autofs4/autofs_i.h b/

Re: [RFC PATCH 0/2] autofs: fix autofs_v5_packet dlivery in compat mode

2017-09-13 Thread Ian Kent
On 01/09/17 19:21, Stanislav Kinsburskiy wrote: > The problem is that in compat mode struct autofs_v5_packet has to have > different size > (i.e. 4 bytes less). I regret (several times over) my original decision to not make v5 packets packed I have to say the description of the problem is n

Re: Do we really need d_weak_revalidate???

2017-08-24 Thread Ian Kent
On 24/08/17 19:03, Michael Kerrisk (man-pages) wrote: > Hi Neil, > > On 24 August 2017 at 06:07, NeilBrown wrote: >> On Wed, Aug 23 2017, Ian Kent wrote: >> >>> >>> That inconsistency has bothered me for quite a while now. >>> >>>

Re: Do we really need d_weak_revalidate???

2017-08-23 Thread Ian Kent
On 24/08/17 12:07, NeilBrown wrote: > > > The more precise details, that automount action for indirect automount > points is not triggered when the 'browse' option is used, is probably > not necessary. > > Ian: if you agree with that text, and Michael doesn't provide alternate > evidence, I'll s

Re: Do we really need d_weak_revalidate???

2017-08-23 Thread Ian Kent
On 24/08/17 12:07, NeilBrown wrote: > On Wed, Aug 23 2017, Ian Kent wrote: > >> >> That inconsistency has bothered me for quite a while now. >> >> It was carried over from the autofs module behavior when automounting >> support was added to the VFS. What'

Re: Do we really need d_weak_revalidate???

2017-08-23 Thread Ian Kent
On 24/08/17 11:21, NeilBrown wrote: > On Wed, Aug 23 2017, Ian Kent wrote: > >> On 23/08/17 10:32, Ian Kent wrote: >>> On 23/08/17 09:06, NeilBrown wrote: >>>> On Mon, Aug 21 2017, Ian Kent wrote: >>>> >>>>>> >>>>>>

Re: Do we really need d_weak_revalidate???

2017-08-23 Thread Ian Kent
On 23/08/17 10:54, Ian Kent wrote: > On 23/08/17 10:40, Ian Kent wrote: >> On 23/08/17 10:32, Ian Kent wrote: >>> On 23/08/17 09:06, NeilBrown wrote: >>>> On Mon, Aug 21 2017, Ian Kent wrote: >>>> >>>>>> >>>>>> A mount i

Re: Do we really need d_weak_revalidate???

2017-08-22 Thread Ian Kent
On 23/08/17 10:40, Ian Kent wrote: > On 23/08/17 10:32, Ian Kent wrote: >> On 23/08/17 09:06, NeilBrown wrote: >>> On Mon, Aug 21 2017, Ian Kent wrote: >>> >>>>> >>>>> A mount isn't triggered by kern_path(pathname, 0, &path).

Re: Do we really need d_weak_revalidate???

2017-08-22 Thread Ian Kent
On 23/08/17 10:32, Ian Kent wrote: > On 23/08/17 09:06, NeilBrown wrote: >> On Mon, Aug 21 2017, Ian Kent wrote: >> >>>> >>>> A mount isn't triggered by kern_path(pathname, 0, &path). >>>> That '0' would need to inclu

Re: Do we really need d_weak_revalidate???

2017-08-22 Thread Ian Kent
On 23/08/17 09:06, NeilBrown wrote: > On Mon, Aug 21 2017, Ian Kent wrote: > >>> >>> A mount isn't triggered by kern_path(pathname, 0, &path). >>> That '0' would need to include one of >>> LOOKUP_PARENT | LOOKUP_DIRECTORY | >>&g

Re: Do we really need d_weak_revalidate???

2017-08-20 Thread Ian Kent
On 21/08/17 14:23, NeilBrown wrote: > On Fri, Aug 18 2017, Ian Kent wrote: > >> On 18/08/17 13:24, NeilBrown wrote: >>> On Thu, Aug 17 2017, Ian Kent wrote: >>> >>>> On 16/08/17 19:34, Jeff Layton wrote: >>>>> On Wed, 2017-08-16 at 12:43

Re: Do we really need d_weak_revalidate???

2017-08-17 Thread Ian Kent
On 18/08/17 14:47, Ian Kent wrote: > On 18/08/17 13:24, NeilBrown wrote: >> On Thu, Aug 17 2017, Ian Kent wrote: >> >>> On 16/08/17 19:34, Jeff Layton wrote: >>>> On Wed, 2017-08-16 at 12:43 +1000, NeilBrown wrote: >>>>> On Mon, Aug 14 2017, Jeff

Re: Do we really need d_weak_revalidate???

2017-08-17 Thread Ian Kent
On 18/08/17 13:24, NeilBrown wrote: > On Thu, Aug 17 2017, Ian Kent wrote: > >> On 16/08/17 19:34, Jeff Layton wrote: >>> On Wed, 2017-08-16 at 12:43 +1000, NeilBrown wrote: >>>> On Mon, Aug 14 2017, Jeff Layton wrote: >>>> >>>>> On Mo

Re: Do we really need d_weak_revalidate???

2017-08-16 Thread Ian Kent
On 16/08/17 19:34, Jeff Layton wrote: > On Wed, 2017-08-16 at 12:43 +1000, NeilBrown wrote: >> On Mon, Aug 14 2017, Jeff Layton wrote: >> >>> On Mon, 2017-08-14 at 09:36 +1000, NeilBrown wrote: On Fri, Aug 11 2017, Jeff Layton wrote: > On Fri, 2017-08-11 at 05:55 +, Trond Myklebus

[PATCH 3/5] autofs: use AUTOFS_DEV_IOCTL_SIZE

2017-08-15 Thread Ian Kent
tion when all it needs is sizeof(struct autofs_dev_ioctl)) Edit: imk That's a good point but I'd prefer to keep the macro define. End edit: imk Signed-off-by: Tomohiro Kusumi Signed-off-by: Ian Kent --- fs/autofs4/dev-ioctl.c | 14 +++--- 1 file changed, 7 insertions(+), 7

[PATCH 1/5] autofs: remove unused AUTOFS_IOC_EXPIRE_DIRECT/INDIRECT

2017-08-15 Thread Ian Kent
-off-by: Tomohiro Kusumi Signed-off-by: Ian Kent --- include/uapi/linux/auto_fs4.h |2 -- 1 file changed, 2 deletions(-) diff --git a/include/uapi/linux/auto_fs4.h b/include/uapi/linux/auto_fs4.h index 7c6da423d54e..9453e9a07c9d 100644 --- a/include/uapi/linux/auto_fs4.h +++ b/include/uapi

[PATCH 2/5] autofs: non functional header inclusion cleanup

2017-08-15 Thread Ian Kent
From: Tomohiro Kusumi Having header includes before any macro (without any dependency) simply looks normal. No reason to have these macros in between. Signed-off-by: Tomohiro Kusumi Signed-off-by: Ian Kent --- fs/autofs4/autofs_i.h | 22 +++--- 1 file changed, 11 insertions

[PATCH 5/5] autofs: use unsigned int/long instead of uint/ulong for ioctl args

2017-08-15 Thread Ian Kent
x27;s already long. Signed-off-by: Tomohiro Kusumi Signed-off-by: Ian Kent --- fs/autofs4/dev-ioctl.c | 10 ++ 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/fs/autofs4/dev-ioctl.c b/fs/autofs4/dev-ioctl.c index a990c9d0f893..b7c816f39404 100644 --- a/fs/autofs4/dev-io

[PATCH 4/5] autofs: drop wrong comment

2017-08-15 Thread Ian Kent
From: Tomohiro Kusumi This comment was correct when it was added in 8d7b48e0 in 2008, but not after 4e44b685 in 2009 which introduced find_autofs_mount(). Signed-off-by: Tomohiro Kusumi Signed-off-by: Ian Kent --- fs/autofs4/dev-ioctl.c |5 - 1 file changed, 5 deletions(-) diff

Re: [PATCH 1/3] autofs - fix AT_NO_AUTOMOUNT not being honored

2017-08-09 Thread Ian Kent
On 09/08/17 17:51, Ian Kent wrote: > On 09/08/17 16:39, David Howells wrote: >> Ian Kent wrote: >> >>> In order to handle the AT_NO_AUTOMOUNT for both system calls the >>> negative dentry case in follow_automount() needs to be changed to >>> return ENOE

Re: [PATCH 1/3] autofs - fix AT_NO_AUTOMOUNT not being honored

2017-08-09 Thread Ian Kent
On 09/08/17 16:39, David Howells wrote: > Ian Kent wrote: > >> In order to handle the AT_NO_AUTOMOUNT for both system calls the >> negative dentry case in follow_automount() needs to be changed to >> return ENOENT when the LOOKUP_AUTOMOUNT flag is clear (and the other >

Re: [PATCH 1/3] autofs - fix AT_NO_AUTOMOUNT not being honored

2017-08-08 Thread Ian Kent
On 08/08/17 21:11, Colin Walters wrote: > On Tue, Aug 8, 2017, at 12:26 AM, Ian Kent wrote: > >> --- a/include/linux/fs.h >> +++ b/include/linux/fs.h >> @@ -3022,8 +3022,7 @@ static inline int vfs_lstat(const char __user *name, >> struct kstat *stat) >> s

[PATCH 2/3] autofs - make disc device user accessible

2017-08-07 Thread Ian Kent
ff-by: Ian Kent Cc: Colin Walters Cc: Ondrej Holy --- fs/autofs4/dev-ioctl.c |3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/fs/autofs4/dev-ioctl.c b/fs/autofs4/dev-ioctl.c index dd9f1bebb5a3..218a4ecc75cc 100644 --- a/fs/autofs4/dev-ioctl.c +++ b/fs/autofs4/dev-io

[PATCH 1/3] autofs - fix AT_NO_AUTOMOUNT not being honored

2017-08-07 Thread Ian Kent
ic as the positive dentry case already handled. Signed-off-by: Ian Kent Cc: David Howells Cc: Colin Walters Cc: Ondrej Holy --- fs/namei.c | 15 --- include/linux/fs.h |3 +-- 2 files changed, 13 insertions(+), 5 deletions(-) diff --git a/fs/namei.c b/fs/namei.c index ddb

[PATCH 3/3] autofs - make dev ioctl version and ismountpoint user accessible

2017-08-07 Thread Ian Kent
Some of the autofs miscellaneous device ioctls need to be accessable to user space applications without CAP_SYS_ADMIN to get information about autofs mounts. Signed-off-by: Ian Kent Cc: Colin Walters Cc: Ondrej Holy --- fs/autofs4/dev-ioctl.c | 12 include/uapi

Re: [PATCH] autofs: sanity check status reported with AUTOFS_DEV_IOCTL_FAIL

2017-06-15 Thread Ian Kent
On Fri, 2017-06-16 at 12:13 +1000, NeilBrown wrote: > On Thu, Jun 15 2017, Andrew Morton wrote: > > > On Wed, 07 Jun 2017 12:08:38 +1000 NeilBrown wrote: > > > > > > > > If a positive status is passed with the AUTOFS_DEV_IOCTL_FAIL > > > ioctl, autofs4_d_automount() will return > > >    ERR_PTR

Re: [PATCH RFC] mnt: umount mounts one by one in umount_tree()

2017-06-13 Thread Ian Kent
On Fri, 2017-05-12 at 00:08 -0700, Andrei Vagin wrote: > With this patch, we don't try to umount all mounts of a tree together. > Instead of this we umount them one by one. In this case, we see a significant > improvement in performance for the worsе case. Indeed, umount has been very slow for a w

Re: [RFC][PATCH 0/9] Make containers kernel objects

2017-05-29 Thread Ian Kent
On Sat, 2017-05-27 at 17:45 +, Trond Myklebust wrote: > On Mon, 2017-05-22 at 14:04 -0500, Eric W. Biederman wrote: > > David Howells writes: > > > > > Here are a set of patches to define a container object for the > > > kernel and > > > to provide some methods to create and manipulate them.

[ANNOUNCE] autofs 5.1.3 release

2017-05-26 Thread Ian Kent
Hi all, It's time for a new release, autofs-5.1.3. Of particular interest is the addition browse support for amd format maps. The browsable_dirs configuration option can be set to either "yes" or "no" and the pseudo option "browsable" can be used as an option of mount type "auto" mounts. Note t

Re: [RFC][PATCH 0/9] Make containers kernel objects

2017-05-24 Thread Ian Kent
On Wed, 2017-05-24 at 03:26 -0500, Eric W. Biederman wrote: > > So far no one has even bothered to seriously try the one solution that > is guaranteed to work because it takes a lot of changes to kernel code. > I believe the last effort snagged on what a pain it is to refactor the > user mode help

Re: [RFC][PATCH 0/9] Make containers kernel objects

2017-05-23 Thread Ian Kent
On Mon, 2017-05-22 at 12:21 -0700, James Bottomley wrote: > > > > >  (3) nfsdcltrack.  A way for NFSD to access stable storage for  > > > > tracking of persistent state.  Again, network-namespace  > > > > dependent, but also perhaps mount-namespace dependent. > > > > Definitely mount-namespace de

Re: [RFC][PATCH 0/9] Make containers kernel objects

2017-05-23 Thread Ian Kent
On Mon, 2017-05-22 at 17:22 +0100, David Howells wrote: > Here are a set of patches to define a container object for the kernel and > to provide some methods to create and manipulate them. > > The reason I think this is necessary is that the kernel has no idea how to > direct upcalls to what users

Re: [RFC][PATCH 0/9] Make containers kernel objects

2017-05-23 Thread Ian Kent
On Mon, 2017-05-22 at 09:53 -0700, James Bottomley wrote: > [Added missing cc to containers list] > On Mon, 2017-05-22 at 17:22 +0100, David Howells wrote: > > Here are a set of patches to define a container object for the kernel  > > and to provide some methods to create and manipulate them. > >

[PATCH 2/3] autofs - make dev ioctl version and ismountpoint user accessible

2017-05-09 Thread Ian Kent
. Signed-off-by: Ian Kent Cc: Colin Walters Cc: Ondrej Holy Cc: sta...@vger.kernel.org --- fs/autofs4/dev-ioctl.c | 12 include/uapi/linux/Kbuild |1 + include/uapi/linux/auto_dev-ioctl.h |2 +- 3 files changed, 10 insertions(+), 5 deletions(-) diff --git

[PATCH 3/3] autofs - fix AT_NO_AUTOMOUNT not being honored

2017-05-09 Thread Ian Kent
ic as the positive dentry case already handled. Signed-off-by: Ian Kent Cc: David Howells Cc: Colin Walters Cc: Ondrej Holy Cc: sta...@vger.kernel.org --- fs/namei.c | 15 --- include/linux/fs.h |3 +-- 2 files changed, 13 insertions(+), 5 deletions(-) diff --git a

[PATCH 1/3] autofs - make disc device user accessible

2017-05-09 Thread Ian Kent
ff-by: Ian Kent Cc: Colin Walters Cc: Ondrej Holy Cc: sta...@vger.kernel.org --- fs/autofs4/dev-ioctl.c |3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/fs/autofs4/dev-ioctl.c b/fs/autofs4/dev-ioctl.c index 734cbf8..9b58d6e 100644 --- a/fs/autofs4/dev-ioctl.c +++ b/fs/au

Re: [git pull] vfs fixes

2017-04-03 Thread Ian Kent
On Mon, 2017-04-03 at 01:00 -0500, Eric W. Biederman wrote: > Al Viro writes: > > > On Sun, Apr 02, 2017 at 05:58:41PM -0700, Linus Torvalds wrote: > > > > > I had to go and double-check that "DCACHE_DIRECTORY_TYPE" is what > > > d_can_lookup() actually checks, so _that_ part is perhaps a bit >

Re: [git pull] vfs fixes

2017-04-03 Thread Ian Kent
On Mon, 2017-04-03 at 01:00 -0500, Eric W. Biederman wrote: > Al Viro writes: > > > On Sun, Apr 02, 2017 at 05:58:41PM -0700, Linus Torvalds wrote: > > > > > I had to go and double-check that "DCACHE_DIRECTORY_TYPE" is what > > > d_can_lookup() actually checks, so _that_ part is perhaps a bit >

Re: [PATCH 4/5] fs/autofs4: Fix a dead URL to ftp.kernel.org

2017-03-27 Thread Ian Kent
On Mon, 2017-03-27 at 14:47 +0900, SeongJae Park wrote: > As ftp.kernel.org is closed [0], this commit fixes a dead URL to > ftp.kernel.org in fs/autofs4/ to use www.kernel.org instead. > > [0] https://www.kernel.org/shutting-down-ftp-services.html > > Signed-off-by: SeongJae Park ACK, and than

[PATCH 4/7] autofs: update ioctl documentation regarding struct autofs_dev_ioctl

2017-01-30 Thread Ian Kent
From: Tomohiro Kusumi This is the same as bf72eda5 except that it's a different file. Sync documentation with changes made by 730c9eec in 2009. Signed-off-by: Tomohiro Kusumi Signed-off-by: Ian Kent --- .../filesystems/autofs4-mount-control.txt |1 + Documentation/filesy

[PATCH 5/7] autofs: add command enum/macros for root-dir ioctls

2017-01-30 Thread Ian Kent
From: Tomohiro Kusumi Sync root-dir ioctl with misc-char-dev ioctl's enum/macro format since these two types of ioctls aren't completely independent of each other in terms of command nr. No functional changes. Signed-off-by: Tomohiro Kusumi Signed-off-by: Ian Kent --- include/

[PATCH 1/7] autofs: remove wrong comment

2017-01-30 Thread Ian Kent
From: Tomohiro Kusumi This format seems to have been taken from device mapper header, but autofs has no such file:function in both kernel and userspace. Signed-off-by: Tomohiro Kusumi Signed-off-by: Ian Kent --- include/uapi/linux/auto_dev-ioctl.h |4 1 file changed, 4 deletions

[PATCH 2/7] autofs: fix typo in Documentation

2017-01-30 Thread Ian Kent
From: Tomohiro Kusumi Signed-off-by: Tomohiro Kusumi Signed-off-by: Ian Kent --- Documentation/filesystems/autofs4.txt |6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/Documentation/filesystems/autofs4.txt b/Documentation/filesystems/autofs4.txt index 8fac3fe

[PATCH 3/7] autofs: fix wrong ioctl documentation regarding devid

2017-01-30 Thread Ian Kent
From: Tomohiro Kusumi This is the same as d8732841 except that it's a different file. A caller has no devid input, and devid is obtained via superblock. Signed-off-by: Tomohiro Kusumi Signed-off-by: Ian Kent --- Documentation/filesystems/autofs4.txt |5 ++--- 1 file changed, 2 inser

[PATCH 7/7] autofs - take more care to not update last_used on path walk

2017-01-30 Thread Ian Kent
accesses. Signed-off-by: Ian Kent --- fs/autofs4/root.c | 17 +++-- 1 file changed, 11 insertions(+), 6 deletions(-) diff --git a/fs/autofs4/root.c b/fs/autofs4/root.c index a11f731..6ddd4fa 100644 --- a/fs/autofs4/root.c +++ b/fs/autofs4/root.c @@ -281,8 +281,8 @@ static int

[PATCH 6/7] autofs: remove duplicated AUTOFS_DEV_IOCTL_SIZE definition

2017-01-30 Thread Ian Kent
From: Tomohiro Kusumi This macro is already defined in uapi header. Also use this macro where possible. Signed-off-by: Tomohiro Kusumi Signed-off-by: Ian Kent --- fs/autofs4/dev-ioctl.c |2 -- include/uapi/linux/auto_dev-ioctl.h |4 ++-- 2 files changed, 2 insertions

Re: linux-next: manual merge of the akpm tree with the vfs tree

2016-12-12 Thread Ian Kent
On Mon, 2016-12-12 at 16:52 +1100, Stephen Rothwell wrote: > Hi all, > > Al let me know that he had put a newer version of the autofs patches > into his vfs tree, so I have dropped the following patches from the akpm > tree today: > >   vfs: change d_manage() to take a struct path >   vfs: add pa

Re: [PATCH 1/7] vfs - merge path_is_mountpoint() and path_is_mountpoint_rcu()

2016-12-07 Thread Ian Kent
On Thu, 2016-12-08 at 17:28 +1300, Eric W. Biederman wrote: > Ian Kent writes: > > > On Thu, 2016-12-08 at 10:30 +1300, Eric W. Biederman wrote: > > > Ian Kent writes: > > > > > > > On Sat, 2016-12-03 at 05:13 +, Al Viro wrote: > > >

Re: [PATCH 1/7] vfs - merge path_is_mountpoint() and path_is_mountpoint_rcu()

2016-12-07 Thread Ian Kent
On Thu, 2016-12-08 at 10:30 +1300, Eric W. Biederman wrote: > Ian Kent writes: > > > On Sat, 2016-12-03 at 05:13 +, Al Viro wrote: > > > FWIW, I've folded that pile into vfs.git#work.autofs. > > > > > > Problems: > > > > snip ...

Re: [PATCH 1/7] vfs - merge path_is_mountpoint() and path_is_mountpoint_rcu()

2016-12-06 Thread Ian Kent
On Sat, 2016-12-03 at 05:13 +, 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 simp

Re: [PATCH 1/7] vfs - merge path_is_mountpoint() and path_is_mountpoint_rcu()

2016-12-04 Thread Ian Kent
On Sun, 2016-12-04 at 10:18 +0800, Ian Kent wrote: > On Sat, 2016-12-03 at 23:29 +, Al Viro wrote: > > > > On Sat, Dec 03, 2016 at 05:13:22AM +, Al Viro wrote: > > > > > > > > > * path_has_submounts() is broken.  At the very least, it's

Re: [PATCH 1/7] vfs - merge path_is_mountpoint() and path_is_mountpoint_rcu()

2016-12-03 Thread Ian Kent
On Sat, 2016-12-03 at 23:29 +, Al Viro wrote: > On Sat, Dec 03, 2016 at 05:13:22AM +, 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

Re: [PATCH 1/7] vfs - merge path_is_mountpoint() and path_is_mountpoint_rcu()

2016-12-03 Thread Ian Kent
On Sat, 2016-12-03 at 05:13 +, 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 touch

Re: [PATCH 1/7] vfs - merge path_is_mountpoint() and path_is_mountpoint_rcu()

2016-11-30 Thread Ian Kent
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.st...@pluto.themaw.net > series? That's right and also to fix an additional problem I

[PATCH 4/7] vfs - change struct path to const in d_manage()

2016-11-27 Thread Ian Kent
From: Ian Kent 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.

[PATCH 3/7] autofs - change struct path to const in autofs4_expire_wait() and autofs4_wait()

2016-11-27 Thread Ian Kent
From: Ian Kent 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 Cc: Al Viro Cc: Eric W. Biederman Cc: Omar Sandoval --- fs/autofs4/autofs_i.h |5 +++-- fs/autofs4/expire.c |4 ++-

[PATCH 6/7] autofs - dont hold spin lock over direct mount expire

2016-11-27 Thread Ian Kent
From: Ian Kent 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

[PATCH 5/7] vfs - constify path parameter of path_has_submounts()

2016-11-27 Thread Ian Kent
From: Ian Kent 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 Cc: Al Viro Cc: Eric W. Biederman Cc: Omar Sandoval --- fs/dcache.c|2 +- include/linux/dcache.h |2 +

[PATCH 2/7] autofs - make struct path const in autofs4_dir_open()

2016-11-27 Thread Ian Kent
From: Ian Kent 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 Cc: Al Viro Cc: Eric W. Biederman Cc: Omar Sandoval --- fs/autofs4/root.c |6 +++--- 1 file cha

[PATCH 7/7] vfs - make may_umount_tree() mount propogation aware

2016-11-27 Thread Ian Kent
From: Ian Kent 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

[PATCH 1/7] vfs - merge path_is_mountpoint() and path_is_mountpoint_rcu()

2016-11-27 Thread Ian Kent
From: Ian Kent 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

Re: [PATCH 1/8] vfs - change d_manage() to take a struct path

2016-10-31 Thread Ian Kent
On Thu, 2016-10-27 at 14:50 +0800, Ian Kent wrote: > On Thu, 2016-10-27 at 10:47 +0800, Ian Kent wrote: > > > > On Thu, 2016-10-27 at 03:11 +0100, Al Viro wrote: > > > > > >   > > > > > > How much testing did it get?  I've several test

Re: [PATCH 1/8] vfs - change d_manage() to take a struct path

2016-10-26 Thread Ian Kent
On Thu, 2016-10-27 at 10:47 +0800, Ian Kent wrote: > On Thu, 2016-10-27 at 03:11 +0100, Al Viro wrote: > >  > > > > How much testing did it get?  I've several test setups involving > > autofs, but they are nowhere near exhaustive and I don't have good &g

Re: [PATCH 6/8] autofs - use path_is_mountpoint() to fix unreliable d_mountpoint() checks

2016-10-26 Thread Ian Kent
On Thu, 2016-10-27 at 03:17 +0100, Al Viro wrote: > On Tue, Oct 11, 2016 at 01:34:18PM +0800, Ian Kent wrote: > > > > + path = file->f_path; > > + > >   /* > >    * An empty directory in an autofs file system is always a > >    * mount point.

Re: [PATCH 1/8] vfs - change d_manage() to take a struct path

2016-10-26 Thread Ian Kent
On Thu, 2016-10-27 at 03:11 +0100, Al Viro wrote: > On Fri, Oct 21, 2016 at 07:39:36AM +0800, Ian Kent wrote: > > > > > Maybe Al has been too busy to comment, he has been on the Cc from the start. > That's... a very mild version of what's been going on.  Let'

Re: [PATCH 1/8] vfs - change d_manage() to take a struct path

2016-10-20 Thread Ian Kent
On Wed, 2016-10-19 at 12:40 -0700, Andrew Morton wrote: > On Tue, 11 Oct 2016 13:33:52 +0800 Ian Kent wrote: > > > For the autofs module to be able to reliably check if a dentry is a > > mountpoint in a multiple namespace environment the ->d_manage() dentry > > operati

Re: [PATCH 1/8] vfs - change d_manage() to take a struct path

2016-10-11 Thread Ian Kent
On Tue, 2016-10-11 at 11:04 -0500, Eric W. Biederman wrote: > Ian Kent writes: > > > For the autofs module to be able to reliably check if a dentry is a > > mountpoint in a multiple namespace environment the ->d_manage() dentry > > operation will need to take a path a

[PATCH 5/8] autofs - change autofs4_wait() to take struct path

2016-10-10 Thread Ian Kent
From: Ian Kent In order to use the functions path_is_mountpoint() (or its rcu-walk variant) and path_has_submounts() autofs needs to pass a struct path in several places. Now change autofs4_wait() to take a struct path instead of a struct dentry. Signed-off-by: Ian Kent Cc: Al Viro Cc: Eric

[PATCH 2/8] vfs - add path_is_mountpoint() helper

2016-10-10 Thread Ian Kent
From: Ian Kent d_mountpoint() can only be used reliably to establish if a dentry is not mounted in any namespace. It isn't aware of the possibility there may be multiple mounts using a given dentry that may be in a different namespace. Add helper functions, path_is_mountpoint() and a

[PATCH 8/8] vfs - remove unused have_submounts() function

2016-10-10 Thread Ian Kent
Now that path_has_submounts() has been added have_submounts() is no longer used so remove it. Signed-off-by: Ian Kent Cc: Al Viro Cc: Eric W. Biederman Cc: Omar Sandoval --- fs/dcache.c| 33 - include/linux/dcache.h |1 - 2 files changed, 34

[PATCH 3/8] vfs - add path_has_submounts()

2016-10-10 Thread Ian Kent
From: Ian Kent d_mountpoint() can only be used reliably to establish if a dentry is not mounted in any namespace. It isn't aware of the possibility there may be multiple mounts using the given dentry, possibly in a different namespace. Add function, path_has_submounts(), that checks is a s

[PATCH 4/8] autofs - change autofs4_expire_wait() to take struct path

2016-10-10 Thread Ian Kent
From: Ian Kent In order to use the functions path_is_mountpoint() (or it's rcu-walk variant) and path_has_submounts() autofs needs to pass a struct path in several places. Start by changing autofs4_expire_wait() to take a struct path instead of a struct dentry. Signed-off-by: Ian Kent C

[PATCH 6/8] autofs - use path_is_mountpoint() to fix unreliable d_mountpoint() checks

2016-10-10 Thread Ian Kent
From: Ian Kent If an automount mount is clone(2)ed into a file system that is propagation private, when it later expires in the originating namespace, subsequent calls to autofs ->d_automount() for that dentry in the original namespace will return ELOOP until the mount is umounted in the clo

<    1   2   3   4   5   6   7   8   >