lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite for Android: free password hash cracker in your pocket
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-Id: <1188562298.6649.39.camel@heimdal.trondhjem.org>
Date:	Fri, 31 Aug 2007 08:11:38 -0400
From:	Trond Myklebust <trond.myklebust@....uio.no>
To:	Linus Torvalds <torvalds@...ux-foundation.org>
Cc:	Jakob Oestergaard <jakob@...hought.net>,
	Frank van Maarseveen <frankvm@...nkvm.com>,
	Hua Zhong <hzhong@...il.com>,
	'Linux Kernel Mailing List' <linux-kernel@...r.kernel.org>,
	akpm@...ux-foundation.org
Subject: Re: recent nfs change causes autofs regression

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.

Trond

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

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ