linux-nfs.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Jeff Layton <jlayton@redhat.com>
To: Chuck Lever <chuck.lever@oracle.com>
Cc: Trond Myklebust <Trond.Myklebust@netapp.com>,
	Linux NFS Mailing List <linux-nfs@vger.kernel.org>
Subject: Re: whither NFS umount?
Date: Tue, 12 Oct 2010 15:18:26 -0400	[thread overview]
Message-ID: <20101012151826.76b75f52@corrin.poochiereds.net> (raw)
In-Reply-To: <C5614601-A685-4D7A-8DC3-23375F88AF42@oracle.com>

On Tue, 12 Oct 2010 13:57:53 -0400
Chuck Lever <chuck.lever@oracle.com> wrote:

> 
> On Oct 12, 2010, at 1:04 PM, Trond Myklebust wrote:
> 
> > On Tue, 2010-10-12 at 12:29 -0400, Chuck Lever wrote:
> >> I've been looking at a bug where "mount.nfs -o remount" wipes all the mount options for that mount out of /etc/mtab, thereby making umounting break.
> >> 
> >> This is a tough nut to crack in user space... Not even utils-linux-ng seems to get mtab option rewriting correct in this case.
> >> 
> >> Jeff suggested a few weeks ago that we should just chuck user space umount and go with a kernel umount implementation.  I'm beginning to think that is a good strategy, even though a UMNT request is advisory.
> >> 
> >>  + Only the kernel knows when the last instance of a shared mount point is gone -- only then should a UMNT be sent to the server
> >> 
> >>  + The kernel might do a delayed lazy UMNT.  It would avoid sending a UMNT until the client is actually done using the export.  Today we just don't send UMNT at all in this case
> >> 
> >>  + The kernel preserves the original mount options in an internal data structure rather than in /etc/mtab, even after a remount.  This eliminates the NFS requirement for /etc/mtab -- one step closer to getting rid of it
> >> 
> >>  + The kernel already handles umounts for under-the-cover NFSv4 mounts, right?
> >> 
> >>  + The kernel is the authority on what is an NFSv4 mount point, so it knows exactly what kind of umount to do every time (send a UMNT or not)
> >> 
> >>  + There is already a UMNT client in the kernel, used when the kernel's MNT request fails such that a UMNT is needed
> >> 
> >> Thoughts, comments?
> >> 
> > 
> > UMNT is an advisory thing. If it causes problems, then lets just drop
> > it.
> 
> Out of interest, what would that look like?  Would we rip out all code from nfsumount.c and network.c that handles UMNT calls?
> 

I think the part that causes problems is having userspace do this. In
theory, if the kernel were in charge of sending the UMNT, then it's not
really a problem since it knows when to do it. If we have code that
sends a UMNT already, why not do a best-effort UMNT call from the
kernel when we tear down the sb?

Either way, eliminating umount.nfs would be nice...

-- 
Jeff Layton <jlayton@redhat.com>

  reply	other threads:[~2010-10-12 19:17 UTC|newest]

Thread overview: 36+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2010-10-12 16:29 whither NFS umount? Chuck Lever
2010-10-12 17:04 ` Trond Myklebust
     [not found]   ` <1286903046.24878.13.camel-rJ7iovZKK19ZJLDQqaL3InhyD016LWXt@public.gmane.org>
2010-10-12 17:57     ` Chuck Lever
2010-10-12 19:18       ` Jeff Layton [this message]
2010-10-12 19:44         ` Trond Myklebust
2010-10-12 19:52           ` Jeff Layton
2010-10-12 19:59             ` Chuck Lever
2010-10-12 20:21             ` Trond Myklebust
2010-10-12 20:26               ` Jeff Layton
2010-10-12 20:34                 ` Chuck Lever
2010-10-12 20:50                   ` Jeff Layton
2010-10-12 21:19                     ` Chuck Lever
2010-10-13  1:00                       ` Jeff Layton
2010-10-13 17:40           ` Steve Dickson
2010-10-13 18:13             ` Jeff Layton
2010-10-13 18:45               ` Steve Dickson
     [not found]                 ` <4CB5FE65.3090409-AfCzQyP5zfLQT0dZR+AlfA@public.gmane.org>
2010-10-13 18:56                   ` Jeff Layton
2010-10-13 18:58                     ` Jeff Layton
     [not found]                     ` <20101013145601.468acc2a-4QP7MXygkU+dMjc06nkz3ljfA9RmPOcC@public.gmane.org>
2010-10-13 19:31                       ` Steve Dickson
2010-10-13 20:47                         ` Chuck Lever
2010-10-13 23:19                           ` Steve Dickson
2010-10-14 15:29                             ` Chuck Lever
2010-10-14 18:27                               ` Steve Dickson
2010-10-14 19:13                                 ` Chuck Lever
2010-10-14 21:24                                   ` Steve Dickson
2010-10-14 22:22                                     ` Chuck Lever
2010-10-15 13:11                                       ` Steve Dickson
2010-10-15 13:41                                         ` Jeff Layton
2010-10-15 16:00                                         ` Chuck Lever
2010-10-15 20:08                                           ` Steve Dickson
2010-10-18 15:18                                             ` Chuck Lever
2010-10-13 18:18             ` Trond Myklebust
2010-10-13 19:28               ` Steve Dickson
2010-10-14 14:00                 ` J. Bruce Fields
2010-10-14 14:17                   ` Trond Myklebust
     [not found]                     ` <1287065841.3015.233.camel-rJ7iovZKK19ZJLDQqaL3InhyD016LWXt@public.gmane.org>
2010-10-14 14:34                       ` J. Bruce Fields

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=20101012151826.76b75f52@corrin.poochiereds.net \
    --to=jlayton@redhat.com \
    --cc=Trond.Myklebust@netapp.com \
    --cc=chuck.lever@oracle.com \
    --cc=linux-nfs@vger.kernel.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 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).