All of lore.kernel.org
 help / color / mirror / Atom feed
From: Ian Kent <raven-PKsaG3nR2I+sTnJN9+BGXg@public.gmane.org>
To: David Howells <dhowells-H+wXaHxf7aLQT0dZR+AlfA@public.gmane.org>
Cc: viro-3bDd1+5oDREiFSDQTTA3OLVCufUGDwFn@public.gmane.org,
	linux-fsdevel-u79uwXL29TY76Z2rM5mHXA@public.gmane.org,
	linux-afs-IAPFreCvJWM7uuMidbF8XUB+6BGkLq7r@public.gmane.org,
	linux-nfs-u79uwXL29TY76Z2rM5mHXA@public.gmane.org,
	linux-cifs-u79uwXL29TY76Z2rM5mHXA@public.gmane.org,
	linux-kernel-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
Subject: Re: [PATCH 1/6] Add a dentry op to handle automounting rather than abusing follow_link() [ver #2]
Date: Tue, 27 Jul 2010 20:51:18 +0800	[thread overview]
Message-ID: <1280235078.2946.21.camel@localhost> (raw)
In-Reply-To: <12883.1280220521-H+wXaHxf7aLQT0dZR+AlfA@public.gmane.org>

On Tue, 2010-07-27 at 09:48 +0100, David Howells wrote:
> Ian Kent <raven-PKsaG3nR2I+sTnJN9+BGXg@public.gmane.org> wrote:
> 
> > Is this something others need?
> 
> Not as far as I know...  I think autofs is the only one doing out-of-kernel
> automounting.
> 
> That doesn't mean it shouldn't be provided, though...
> 
> > Again, the exists vs not yet exists case for paths within indirect
> > autofs mounts. At the moment I can just set the flag on all dentrys in
> > the autofs fs and return EXDEV for non-empty directories in order to
> > return the dentry as a path component. OTOH if the dentry is a mount
> > embeded in the path and the mount fails we get a error return.
> 
> Seems redundant, but I'd say go with it for now.  Maybe we can offload
> S_AUTOMOUNT to the dentry.

Yes, it is redundant but it is simple and works fine as long as I don't
apply the patch to return -EREMOTE for non-terminal dentrys. I'd need to
clear the flag, as below, on non-terminal dentrys if the -EREMOTE patch
is needed.

> 
> > I could clear the flag on non-root parent dentrys during mkdir if this
> > is needed by others.
> 
> I'm not sure that would actually matter, since it would come to
> follow_automount() at the same place.
> 
> Note that someone who tries to stat() with AT_NO_AUTOMOUNT will cause the call
> to d_automount() to be suppressed and will see the negative or non-mounted
> directory.  That might be okay for you.

With one small correction to the autofs patch I've been able to
successfully run the autofs Connectathon parser test without any user
space changes for both the nobrowse (the usual case) and the browse
(pre-created mount point directories) cases. The test consists of 230
mounts, with success and fail cases, for both direct and indirect
mounts. These mounts include various offset mount constructs as well. To
consider the test a success I require the mounts to also expire
correctly.

There are more tests to run, such as the program mount test, and the
often problematic submount test. Also, I have a submount based stress
test.

But, all in all, this is shaping up to be just what I need. Having one
single place to call back to the daemon, where I don't need to play
around with the inode mutex, makes me think this implementation will
finally resolve my deadlock issue with indirect mounts.

Ian

WARNING: multiple messages have this Message-ID (diff)
From: Ian Kent <raven@themaw.net>
To: David Howells <dhowells@redhat.com>
Cc: viro@ZenIV.linux.org.uk, linux-fsdevel@vger.kernel.org,
	linux-afs@lists.infradead.org, linux-nfs@vger.kernel.org,
	linux-cifs@vger.kernel.org, linux-kernel@vger.kernel.org
Subject: Re: [PATCH 1/6] Add a dentry op to handle automounting rather than abusing follow_link() [ver #2]
Date: Tue, 27 Jul 2010 20:51:18 +0800	[thread overview]
Message-ID: <1280235078.2946.21.camel@localhost> (raw)
In-Reply-To: <12883.1280220521@redhat.com>

On Tue, 2010-07-27 at 09:48 +0100, David Howells wrote:
> Ian Kent <raven@themaw.net> wrote:
> 
> > Is this something others need?
> 
> Not as far as I know...  I think autofs is the only one doing out-of-kernel
> automounting.
> 
> That doesn't mean it shouldn't be provided, though...
> 
> > Again, the exists vs not yet exists case for paths within indirect
> > autofs mounts. At the moment I can just set the flag on all dentrys in
> > the autofs fs and return EXDEV for non-empty directories in order to
> > return the dentry as a path component. OTOH if the dentry is a mount
> > embeded in the path and the mount fails we get a error return.
> 
> Seems redundant, but I'd say go with it for now.  Maybe we can offload
> S_AUTOMOUNT to the dentry.

Yes, it is redundant but it is simple and works fine as long as I don't
apply the patch to return -EREMOTE for non-terminal dentrys. I'd need to
clear the flag, as below, on non-terminal dentrys if the -EREMOTE patch
is needed.

> 
> > I could clear the flag on non-root parent dentrys during mkdir if this
> > is needed by others.
> 
> I'm not sure that would actually matter, since it would come to
> follow_automount() at the same place.
> 
> Note that someone who tries to stat() with AT_NO_AUTOMOUNT will cause the call
> to d_automount() to be suppressed and will see the negative or non-mounted
> directory.  That might be okay for you.

With one small correction to the autofs patch I've been able to
successfully run the autofs Connectathon parser test without any user
space changes for both the nobrowse (the usual case) and the browse
(pre-created mount point directories) cases. The test consists of 230
mounts, with success and fail cases, for both direct and indirect
mounts. These mounts include various offset mount constructs as well. To
consider the test a success I require the mounts to also expire
correctly.

There are more tests to run, such as the program mount test, and the
often problematic submount test. Also, I have a submount based stress
test.

But, all in all, this is shaping up to be just what I need. Having one
single place to call back to the daemon, where I don't need to play
around with the inode mutex, makes me think this implementation will
finally resolve my deadlock issue with indirect mounts.

Ian



  parent reply	other threads:[~2010-07-27 12:51 UTC|newest]

Thread overview: 27+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2010-07-22 17:58 [PATCH 1/6] Add a dentry op to handle automounting rather than abusing follow_link() David Howells
2010-07-22 17:58 ` David Howells
2010-07-22 17:58 ` [PATCH 2/6] AFS: Use d_automount() " David Howells
2010-07-22 17:59 ` [PATCH 5/6] Remove the automount through follow_link() kludge code from pathwalk David Howells
2010-07-22 17:59 ` [PATCH 6/6] Add an AT_NO_AUTOMOUNT flag to suppress terminal automount David Howells
     [not found] ` <20100722175847.5552.11520.stgit-S6HVgzuS8uM4Awkfq6JHfwNdhmdF6hFW@public.gmane.org>
2010-07-22 17:58   ` [PATCH 3/6] NFS: Use d_automount() rather than abusing follow_link() David Howells
2010-07-22 17:58     ` David Howells
2010-07-22 17:59   ` [PATCH 4/6] CIFS: " David Howells
2010-07-22 17:59     ` David Howells
2010-07-23 15:09   ` [PATCH 1/6] Add a dentry op to handle automounting rather than abusing follow_link() [ver #2] David Howells
2010-07-23 15:09     ` David Howells
     [not found]     ` <17723.1279897759-H+wXaHxf7aLQT0dZR+AlfA@public.gmane.org>
2010-07-24  4:11       ` Ian Kent
2010-07-24  4:11         ` Ian Kent
2010-07-26 14:19     ` David Howells
     [not found]       ` <9168.1280153997-H+wXaHxf7aLQT0dZR+AlfA@public.gmane.org>
2010-07-26 15:22         ` Ian Kent
2010-07-26 15:22           ` Ian Kent
2010-07-26 15:54       ` David Howells
     [not found]         ` <30118.1280159695-H+wXaHxf7aLQT0dZR+AlfA@public.gmane.org>
2010-07-27  3:43           ` Ian Kent
2010-07-27  3:43             ` Ian Kent
2010-07-27  8:48         ` David Howells
     [not found]           ` <12883.1280220521-H+wXaHxf7aLQT0dZR+AlfA@public.gmane.org>
2010-07-27 12:51             ` Ian Kent [this message]
2010-07-27 12:51               ` Ian Kent
     [not found] ` <20100722175913.5552.3905.stgit-S6HVgzuS8uM4Awkfq6JHfwNdhmdF6hFW@public.gmane.org>
2010-07-22 18:01   ` [PATCH 6/6] Add an AT_NO_AUTOMOUNT flag to suppress terminal automount David Howells
2010-07-22 18:01     ` David Howells
2010-07-23 15:11   ` [PATCH 6/6] Add an AT_NO_AUTOMOUNT flag to suppress terminal automount [ver #2] David Howells
2010-07-23 15:11     ` David Howells
2010-07-23 15:11     ` David Howells

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1280235078.2946.21.camel@localhost \
    --to=raven-pksag3nr2i+stnjn9+bgxg@public.gmane.org \
    --cc=dhowells-H+wXaHxf7aLQT0dZR+AlfA@public.gmane.org \
    --cc=linux-afs-IAPFreCvJWM7uuMidbF8XUB+6BGkLq7r@public.gmane.org \
    --cc=linux-cifs-u79uwXL29TY76Z2rM5mHXA@public.gmane.org \
    --cc=linux-fsdevel-u79uwXL29TY76Z2rM5mHXA@public.gmane.org \
    --cc=linux-kernel-u79uwXL29TY76Z2rM5mHXA@public.gmane.org \
    --cc=linux-nfs-u79uwXL29TY76Z2rM5mHXA@public.gmane.org \
    --cc=viro-3bDd1+5oDREiFSDQTTA3OLVCufUGDwFn@public.gmane.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.