linux-fsdevel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Dave Hansen <dave@linux.vnet.ibm.com>
To: Jens Rottmann <JRottmann@LiPPERTEmbedded.de>
Cc: Al Viro <viro@zeniv.linux.org.uk>,
	linux-fsdevel <linux-fsdevel@vger.kernel.org>,
	"linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>
Subject: Re: "r/o bind mounts" patch in 2.6.26-rc6 changes (breaks?) error behaviour
Date: Fri, 20 Jun 2008 08:28:09 -0700	[thread overview]
Message-ID: <1213975689.7512.36.camel@nimitz> (raw)
In-Reply-To: <1213971466.7512.17.camel@nimitz>

On Fri, 2008-06-20 at 07:17 -0700, Dave Hansen wrote:
> On Fri, 2008-06-20 at 12:16 +0200, Jens Rottmann wrote:
> > 
> > I noticed the following change in the error behaviour when attempting
> > to delete nonexisting files/dirs from R/O-mounted directories:
> > 
> > Linux 2.6.25.7:
> > rm /RO_mounted_path/nonexisting_file
> > ==> "No such file or directory"
> > 
> > Linux 2.6.26-rc6-git6:
> > rm /RO_mounted_path/nonexisting_file
> > ==> "Read-only file system"
> 
> We looked at this way back in the beginning when I started to work on
> the patches.  It was decided that the error codes weren't horribly
> important.  We did have a case a bit ago where it really mattered, and
> Al fixed that up.
> 
> I know this changed behavior a bit, but userspace can surely work around
> it with read-only operations (stat) when it is really important to get
> the error to the user just right.

Also, there are some nice benefits to the new way of doing it.  To
figure out if there is a file in that location also requires a path
walk.  Now, that isn't the most expensive thing in the world, but it is
a heck of a lot more expensive than just doing a read-only look at a
variable in the mount (in mnt_want_write()).

Don't you *want* warnings when an 'rm -f' runs into a r/o filesystem? ;)

-- Dave


  reply	other threads:[~2008-06-20 15:28 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <485B8361.6010708@LiPPERTEmbedded.de>
2008-06-20 14:17 ` "r/o bind mounts" patch in 2.6.26-rc6 changes (breaks?) error behaviour Dave Hansen
2008-06-20 15:28   ` Dave Hansen [this message]
2008-06-20 16:14     ` Jens Rottmann
2008-06-24 18:21   ` Pavel Machek

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=1213975689.7512.36.camel@nimitz \
    --to=dave@linux.vnet.ibm.com \
    --cc=JRottmann@LiPPERTEmbedded.de \
    --cc=linux-fsdevel@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --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).