mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Linus Torvalds <torvalds@linux-foundation.org>
To: David Howells <dhowells@redhat.com>
Cc: Trond Myklebust <trond.myklebust@fys.uio.no>,
	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: Tue, 4 Sep 2007 02:04:12 -0700 (PDT)	[thread overview]
Message-ID: <alpine.LFD.0.999.0709040152080.3088@evo.linux-foundation.org> (raw)
In-Reply-To: <6503.1188894940@redhat.com>



On Tue, 4 Sep 2007, David Howells wrote:
> 
> That helps one case, yes, but what about a superset?  What about two sets that
> might intersect but for which you don't have the common root to hand?

Sure. In which case bind mounts don't work. Fair enough.

> The case I came up with was this:
> 
> 	mount home:/home/fred /home/fred
> 	mount home:/home/jim /home/jim

The much more trivial case is

	mount -o ro server:/usr/bin /usr/share/bin
	mount server:/usr/tmp /usr/share/tmp

and now tell me any reasonable reason why this should fail? (Replace "-o 
ro" with any other attributes).

Quite frankly, if the above two mounts fail - just beause /usr/bin and 
/usr/tmp happen to be on the same filesystem on the server - then the 
implementation is more than just buggy - it's a pure piece of shit.

And quite frankly, as far as I can tell, that was exactly what the NFS 
changes that are being discussed did. They failed the equivalent of the 
second mount, because it didn't have the same flags as the first one.

Can you really honestly say that wasn't totally broken?

> The reason I added all this NFS superblock sharing is so that I could implement
> on-disk local caching much more easily.  If, for instance, two netfs inodes
> aren't shared, but their "index keys" say they should use the same piece of
> cache then all sorts of fun ensues from the disjoint cache coherency.
> 
> Even working out that two inodes are using the same piece of cache isn't
> trivial (though it seems like it ought to be).

I'm just saying that the whole "require all mount flags to be identical, 
and error out if they are not" is pure and utter CRAP.

So anything that does that - for *any* reason what-so-ever - is just 
broken. If you require identical mount-time flags, that absolutely has to 
be a special case (like using "--bind", or perhaps using a special option 
like "sharecache").

It really is that simple. I don't know how anybody could possibly ever 
dispute that.

As far as I can tell, the current situation in NFS is "reasonably ok", but 
I already asked Trond about what happens with "remount" with the "same 
mount options imply sharecache" code that he did, and afaik, I never got 
an answer. In other words, let's change the above two commands to the 
following three commands:

	mount server:/usr/bin /usr/share/bin
	mount server:/usr/tmp /usr/share/tmp
	mount -o remount,ro /usr/share/bin

and I'm claiming that if the above fails (or remounts /usr/share/tmp as 
read-only too), then it's also obvious CRAP (replace "ro" with any other 
possible attribute - whether cache timeouts or similar)

See? It really is that simple. The obvious mount usage above absolutely 
*has* to work, and anything that breaks it is crap, crap, crap. And that 
was exactly what apparently happened here, and I really don't see why 
anybody has the *gall* to claim that the "default to sharecache" code 
wasn't totally broken.

			Linus

  reply	other threads:[~2007-09-04  9:05 UTC|newest]

Thread overview: 57+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2007-08-30 21:07 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
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-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 12:44         ` Ian Kent
2007-09-05 16:26           ` Trond Myklebust
2007-09-05 15:34         ` David Howells
2007-09-05 15:37         ` David Howells
2007-09-05 15:50           ` Trond Myklebust
2007-09-06  5:23             ` Ian Kent
2007-09-04  8:02       ` David Howells
2007-09-04  8:35       ` David Howells
2007-09-04  9:04         ` Linus Torvalds [this message]
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=alpine.LFD.0.999.0709040152080.3088@evo.linux-foundation.org \
    --to=torvalds@linux-foundation.org \
    --cc=akpm@linux-foundation.org \
    --cc=dhowells@redhat.com \
    --cc=frankvm@frankvm.com \
    --cc=hzhong@gmail.com \
    --cc=linux-kernel@vger.kernel.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

Powered by JetHome