public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: Frank van Maarseveen <frankvm@frankvm.com>
To: Trond Myklebust <trond.myklebust@fys.uio.no>
Cc: Linus Torvalds <torvalds@linux-foundation.org>,
	Jakob Oestergaard <jakob@unthought.net>,
	Frank van Maarseveen <frankvm@frankvm.com>,
	Hua Zhong <hzhong@gmail.com>,
	"'Linux Kernel Mailing List'" <linux-kernel@vger.kernel.org>,
	akpm@linux-foundation.org
Subject: Re: recent nfs change causes autofs regression
Date: Fri, 31 Aug 2007 15:12:26 +0200	[thread overview]
Message-ID: <20070831131226.GA24084@janus> (raw)
In-Reply-To: <1188562298.6649.39.camel@heimdal.trondhjem.org>

On Fri, Aug 31, 2007 at 08:11:38AM -0400, Trond Myklebust wrote:
> On Fri, 2007-08-31 at 01:07 -0700, Linus Torvalds wrote:
> > 
> 
> > If you want new behaviour, you add a new flag saying you want new 
> > behaviour. You don't just start behaving differently from what you've 
> > always done before (and what *other* UNIXes do, for that matter).
> > 
> > Besides, even *if* it was a matter of somebody doing a mount with "rw", 
> > when the previous mount was "ro", returning EBUSY is still the wrong thing 
> > to do! If the user asks for a new mount that is read-write, he should just 
> > get it - ie we should not re-use the old client handles, and we should do 
> > what Solaris apparently does, namely to just make it a totally different 
> > mount.
> > 
> > In other words, it should (as I already mentioned once) have used 
> > "nosharecache" by default, which makes it all work.
> > 
> > Then, people who want to re-use the caches (which in turn may mean that 
> > everything needs to have the same flags), THOSE PEOPLE, who want the NEW 
> > SEMANTICS (errors and all) should then use a "sharecache" flag.
> 
> That would be a major change in existing semantics. The default has been
> "sharecache" ever since Al Viro introduced the "sget()" function some 6
> or 7 years ago. The problem was that we never advertised the fact that
> the kernel was overriding your mount options, and so sysadmins were
> (rightly IMO) complaining that they should _know_ when the client does
> this.
> 
> The list of known problems with a "nosharecache" default is nasty too:
>         
>         - file and directory attribute and data caching breaks.
>         Applications will see stale data in cases where they otherwise
>         would not expect it.
>         
>         - the existing dcache and icache issues when a file is renamed
>         or deleted on the server are now extended to also include the
>         case where the rename or deletion occurs on an alias in another
>         directory on the client itself. In particular, sillyrename will
>         break.
>         
>         - file locking breaks (the server knows that the client holds
>         locks on one file, whereas the client thinks it holds locks on
>         several).
>         
>         - the NFSv4 delegation model breaks: the client will be using
>         OPEN when it could use cached opens. More importantly, when
>         performing an operation that requires it to return the
>         delegation on the aliased file, it won't know until the server
>         sends it a callback.
> 
> ...and of course, the amount of unnecessary traffic to the server
> increases. I'm not aware of any sane way of dealing with those issues,
> and I doubt Solaris has a solution for them either.

All of this won't happen when server foo exports /bar and a client
mounts /bar/x and /bar/y separately: there must be a shared subtree or
hard-links between files within them, right?

An obvious (but disruptive) server side workaround is to export the
subtrees with different fsid= but that would give the same list of
problems as above, right?

IMHO I'd only consider returning EBUSY when trying to mount _exactly_
the same directory with different flags, not for arbitrary subtrees. The
client should preferably not be bothered with server side disk
partitioning (at least not beyond the obvious such as df output).

-- 
Frank

  reply	other threads:[~2007-08-31 13:12 UTC|newest]

Thread overview: 57+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2007-08-30 21:07 recent nfs change causes autofs regression Hua Zhong
2007-08-30 22:37 ` Trond Myklebust
2007-08-30 22:47   ` Hua Zhong
2007-08-30 23:22     ` Trond Myklebust
2007-08-30 23:30       ` Hua Zhong
2007-08-30 23:37         ` Trond Myklebust
2007-08-30 23:44           ` Hua Zhong
2007-08-31  4:31             ` Trond Myklebust
2007-08-31  4:38               ` Linus Torvalds
2007-08-31  4:47                 ` Hua Zhong
2007-08-31  4:57                 ` Trond Myklebust
2007-08-31  5:09               ` Ian Kent
2007-08-31  7:50               ` Matthias Schniedermeyer
2007-08-31  1:24   ` Andrew Morton
2007-08-31  4:33     ` Trond Myklebust
2007-08-31  3:49   ` Linus Torvalds
2007-08-31  3:57     ` Hua Zhong
2007-08-31  4:44     ` Trond Myklebust
2007-08-31  4:59       ` Linus Torvalds
2007-08-31  5:04         ` Trond Myklebust
2007-08-31  5:16           ` Linus Torvalds
2007-08-31  7:40             ` Jakob Oestergaard
2007-08-31  8:07               ` Linus Torvalds
2007-08-31  8:51                 ` Jakob Oestergaard
2007-08-31 16:43                   ` Linus Torvalds
2007-09-03 13:20                     ` Jakob Oestergaard
2007-09-03 13:43                       ` Martin Knoblauch
2007-08-31 12:11                 ` Trond Myklebust
2007-08-31 13:12                   ` Frank van Maarseveen [this message]
2007-08-31 13:50                     ` Trond Myklebust
2007-08-31 14:42                       ` Frank van Maarseveen
2007-09-04  7:51                   ` David Howells
2007-08-31  8:28               ` Frank van Maarseveen
2007-08-31  5:24           ` Hua Zhong
2007-08-31  5:38         ` Ian Kent
2007-08-31  8:54           ` Martin Knoblauch
2007-08-31 16:21     ` Trond Myklebust
2007-08-31 17:01       ` Linus Torvalds
2007-08-31 19:03         ` Trond Myklebust
2007-09-04  8:02         ` David Howells
2007-09-04  8:35         ` David Howells
2007-09-04  9:04           ` Linus Torvalds
2007-08-31 18:47       ` Hua Zhong
2007-08-31 19:13         ` Trond Myklebust
2007-08-31 19:35           ` Hua Zhong
2007-08-31 19:41           ` Hua Zhong
2007-09-02  0:58       ` Bill Davidsen
2007-09-04  7:54         ` David Howells
2007-09-05 12:35           ` Bill Davidsen
2007-09-05 15:34             ` David Howells
2007-09-05 12:44           ` Ian Kent
2007-09-05 15:37             ` David Howells
2007-09-05 15:50               ` Trond Myklebust
2007-09-06  5:23                 ` Ian Kent
2007-09-05 16:26             ` Trond Myklebust
2007-08-31  8:14 ` Frank van Maarseveen
2007-08-31  9:05   ` Ian Kent

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=20070831131226.GA24084@janus \
    --to=frankvm@frankvm.com \
    --cc=akpm@linux-foundation.org \
    --cc=hzhong@gmail.com \
    --cc=jakob@unthought.net \
    --cc=linux-kernel@vger.kernel.org \
    --cc=torvalds@linux-foundation.org \
    --cc=trond.myklebust@fys.uio.no \
    /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