linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Bill Davidsen <davidsen@tmr.com>
To: Trond Myklebust <trond.myklebust@fys.uio.no>
Cc: Linus Torvalds <torvalds@linux-foundation.org>,
	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: Sat, 01 Sep 2007 20:58:25 -0400	[thread overview]
Message-ID: <46DA0AB1.8050504@tmr.com> (raw)
In-Reply-To: <1188577275.6649.133.camel@heimdal.trondhjem.org>

Trond Myklebust wrote:
> On Thu, 2007-08-30 at 20:49 -0700, Linus Torvalds wrote:
>> Please send in a fix. If the fix involves making "nosharecache" the 
>> default, then that is better than making policy decisions like this in the 
>> kernel. The kernel should do what the user asks and not put in unnecessary 
>> roadblocks.
> 
> The best I can do given the constraints appears to be to have the kernel
> first look for a superblock that matches both the fsid and the
> user-specified mount options, and then spawn off a new superblock if
> that search fails. The attached patch does just that.
> 
I'm glad I read the whole thread, because when I saw it earlier and 
didn't respond, this was the question I had, why not replace the error 
with forcing "nosharecache" on, which is essentially what you have done.

> Note that this is not the same as specifying nosharecache everywhere
> since nosharecache will never attempt to match an existing superblock.
> 
> Finally, for the record: I still feel very uncomfortable about not being
> able to report the state of the client setup back to the sysadmin.
> AFAIK, the only way to do so is to stat the mountpoints, and compare the
> device ids.
> 
Since clients may not know the server setup, and it may change for 
policy or error recovery reason, I think this patch is needed.

The cases I think are common are:

1 - single export, multiple client mounts

export /base - rw

mount /base/share - ro		[ client enforces r/o or not ]
mount /base/upload - rw

2 - export parts of a filesystem (/base) [ server enforces access ]

export /base/share - ro		[ hopefully really r/o on client ]
export /base/upload - rw	[ should work for write ]

3 - mount the same f/s with different permissions on client

export /base - rw

mount /base on point1 - rw	[ hopefully really r/w ]
mount /base on point2 - ro	[ hopefully r/o ]

I consider this *really* bad practice, but I have seen it in enough 
places to know others don't agree. It assumes the client will protect 
the r/o data.

4 - export f/s and part of f/s

export /base/ - ro
export /base/upload - rw

clients may mount one or both, with the upload directory as part of base 
or elsewhere. What will happen here?

> Trond


-- 
Bill Davidsen <davidsen@tmr.com>
   "We have more to fear from the bungling of the incompetent than from
the machinations of the wicked."  - from Slashdot

  parent reply	other threads:[~2007-09-02  0:58 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
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 [this message]
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
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=46DA0AB1.8050504@tmr.com \
    --to=davidsen@tmr.com \
    --cc=akpm@linux-foundation.org \
    --cc=frankvm@frankvm.com \
    --cc=hzhong@gmail.com \
    --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;
as well as URLs for NNTP newsgroup(s).