linux-fsdevel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Aurelien Degremont <aurelien.degremont@cea.fr>
To: trond.myklebust@fys.uio.no, viro@zeniv.linux.org.uk
Cc: linux-fsdevel@vger.kernel.org, linux-kernel@vger.kernel.org,
	nfs@lists.sourceforge.net,
	Jacques-Charles Lafoucriere <jc.lafoucriere@cea.fr>
Subject: Re: NFS superblock sharing implies mount flags bug
Date: Mon, 20 Mar 2006 14:20:05 +0100	[thread overview]
Message-ID: <441EAC05.7020903@cea.fr> (raw)
In-Reply-To: <200603151038.LAA21392@styx.bruyeres.cea.fr>

Nobody is interested by this issue ?
It could be easily reproduced. All recent versions are concerned.

Aurelien


Aurelien Degremont wrote:
> Hello
> 
> I'm facing incorrect using of mount flags when dealing with NFS mounts 
> and I think it could be seen as a bug.
> 
> The error occurs when mounting the same NFS export many times, on the 
> same machine but *with different mount flags*, particularly concerning 
> RO/RW flags.
> 
> As the NFS client code re-uses superblocks when it detects that it is 
> the same export (same server/same port/same exported directory) and that 
> the read-only flag is managed as a per-superblock flag, if a NFS exports 
> is mounted a second time, the superblock of the first mount is re-used 
> and the specified mount flag is ignored.
> 
> # mount foo:/bar /bar_ro -o ro
> # mount foo:/bar /bar_rw -o rw
> $ touch /bar_rw/bar
> touch: cannot touch `/bar_rw/bar': Read-only file system
> 
> Ideally, the best solution to fix this is to move the RDONLY flag from 
> its per-superblock basis to a per-mountpoint (vfsmount) basis. I do not 
> know is there is a something that prevent that except that this implies 
> many changes as many codes do not use macros but access s_flags directly.
> 
> It seems quite clear that the superblock sharing couldn't be changed (to 
> avoid incoherency, inode aliasing and so on...) ?
> 
> Do you have a (better) solution ?
> I can help if needed.
> 
> 
> Cordially
> 


-- 
Aurelien Degremont
CEA/DAM - DIF/DSSI/SISR

  reply	other threads:[~2006-03-20 13:20 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2006-03-15 10:37 NFS superblock sharing implies mount flags bug Aurelien Degremont
2006-03-20 13:20 ` Aurelien Degremont [this message]
2006-03-20 18:05   ` Trond Myklebust

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=441EAC05.7020903@cea.fr \
    --to=aurelien.degremont@cea.fr \
    --cc=jc.lafoucriere@cea.fr \
    --cc=linux-fsdevel@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=nfs@lists.sourceforge.net \
    --cc=trond.myklebust@fys.uio.no \
    --cc=viro@zeniv.linux.org.uk \
    /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).