linux-fsdevel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* Re: [RFC v4 4/9] namespace: Add umount_end superblock operation
       [not found]     ` <20171206123344.GA9875@ZenIV.linux.org.uk>
@ 2017-12-06 15:41       ` Joshua Watt
  0 siblings, 0 replies; only message in thread
From: Joshua Watt @ 2017-12-06 15:41 UTC (permalink / raw)
  To: Al Viro
  Cc: NeilBrown, Jeff Layton, Trond Myklebust, J . Bruce Fields,
	linux-nfs, David Howells, linux-fsdevel

On Wed, 2017-12-06 at 12:33 +0000, Al Viro wrote:
> On Wed, Dec 06, 2017 at 12:14:41PM +0000, Al Viro wrote:
> > On Fri, Nov 17, 2017 at 11:45:47AM -0600, Joshua Watt wrote:
> > > The umount_end operation allows cleaning of state set by
> > > umount_begin in
> > > the event the filesystem doesn't actually get unmounted.
> > 
> > The locking doesn't make any sense.  This thing can come at *any*
> > moment -
> > one process does this force-unmount of yours, another comes and
> > accesses
> > the damn thing just as you've decided that umount has failed and go
> > to call that method.
> 
> Consider, BTW, the situation when another umount -f comes just as
> you've
> dropped ->s_umount.  Now your ->umount_end() comes *after*
> ->umount_begin()
> from the second call.

Yes I realised that was a posibility, which is why the NFS
implementation of this uses an atomic counter in ->umount_begin() and 
->umount_end(). My line of thinking was that most fs drivers are
probably going to ignore ->umount_end(), so it is only those that
implement it that need to actually account for that problem.

Or rather put, we can punt that problem to the FS driver writers if
they choose to implement ->umount_end(). Maybe that isn't fair to the
fs driver writers? Or maybe it just needs better documentation of that
expectation?

cc'ing linux-fsdevel@vger.kernel.org, original message chain can be
found here:
http://www.spinics.net/lists/linux-nfs/msg66483.html

Thanks,
Joshua Watt

^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2017-12-06 15:42 UTC | newest]

Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
     [not found] <20171117174552.18722-1-JPEWhacker@gmail.com>
     [not found] ` <20171117174552.18722-5-JPEWhacker@gmail.com>
     [not found]   ` <20171206121441.GA21978@ZenIV.linux.org.uk>
     [not found]     ` <20171206123344.GA9875@ZenIV.linux.org.uk>
2017-12-06 15:41       ` [RFC v4 4/9] namespace: Add umount_end superblock operation Joshua Watt

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).