Re: recent nfs change causes autofs regression



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
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/



Relevant Pages

  • Re: After a full day of computers...
    ... > computers in question run SuSE 9.1 Pro and nothing but. ... > through the CUPS server). ... You need to create a mountpoint on the client machine. ... Once the shares have been created, they need to be mapped onto the mount ...
    (alt.os.linux.suse)
  • Re: FC6 NFS wont mount as regular user, nor automatically in fstab
    ... client box to connect to a RH9 file server that's been here for eons, ... But I thought I'd get wit' da program and use NFS for this FC6 client ... connecting to the server. ... On the client, I can mount manually, as ROOT. ...
    (Fedora)
  • Re: nfs not working with kerberos
    ... server is correctly complaining that the client is not listed for NFSv3 ... without kerberos i get to mount the filesystems) ... /etc/fstab on client (sughero) ...
    (comp.protocols.kerberos)
  • Re: NFS mount hangs when using one specific IP
    ... It's the same for a client that's working. ... mount: server:/home failed, reason given by server: Keine Berechtigung (i.e. ... portmapper to get the required port numbers etc. ...
    (comp.os.linux.networking)
  • IAS authenticates using EAP-TLS but not PEAP-MSCHAPv2
    ... with a Radius server. ... When I change the client and server profiles to reflect this I ... Type: 13, TLS blob length: 0. ... Flags: S ...
    (microsoft.public.internet.radius)