linux-fsdevel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Andrew Morton <akpm@linux-foundation.org>
To: Philippe De Muyter <phdm@macqel.be>
Cc: linux-kernel@vger.kernel.org, Al Viro <viro@zeniv.linux.org.uk>,
	Dave Chinner <david@fromorbit.com>,
	linux-fsdevel@vger.kernel.org, torvalds@linux-foundation.org
Subject: Re: [PATCH PING] VFS: mount must return EACCES, not EROFS
Date: Wed, 2 Jul 2014 12:46:51 -0700	[thread overview]
Message-ID: <20140702124651.38b315a8adce63a37fccc60e@linux-foundation.org> (raw)
In-Reply-To: <20140627082058.GA24986@frolo.macqel>

On Fri, 27 Jun 2014 10:20:58 +0200 Philippe De Muyter <phdm@macqel.be> wrote:

> Currently, the initial mount of the root file system by the linux
> kernel fails with a cryptic message instead of being retried with
> the MS_RDONLY flag set,  when the device is read-only and the
> combination of block driver and filesystem driver yields EROFS.
> 
> I do not know if POSIX mandates that mount(2) must fail with EACCES, nor
> if linux aims to strict compliance with POSIX on that point.  Consensus
> amongst the messages that I have read so far seems to show that linux
> kernel hackers feel that EROFS is a more appropriate error code than
> EACCES in that case.
> 
> So, do you choose for my first pragmatic and non-intrusive patch, that
> lets mount_block_root() retry with MS_RDONLY if the file system
> returns EROFS (https://lkml.org/lkml/2014/6/18/468) or for the second
> one that forces all file-systems to return EACCES instead of EROFS.
> (https://lkml.org/lkml/2014/6/20/98).

They both seem a little hacky to me.

Isn't the core problem that "the combination of block driver and
filesystem driver yields EROFS"?  That the fs should instead be
returning EACCESS in this case?

What fs and block driver are we talking about here, anyway?

  reply	other threads:[~2014-07-02 19:46 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <20140619230924.GO4453@dastard>
2014-06-20  8:39 ` [PATCH] VFS: mount must return EACCES, not EROFS Philippe De Muyter
2014-06-27  8:20   ` [PATCH PING] " Philippe De Muyter
2014-07-02 19:46     ` Andrew Morton [this message]
2014-07-03 16:29       ` Philippe De Muyter
2014-07-08 21:02         ` Andrew Morton
2014-07-15 10:05           ` Philippe De Muyter

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=20140702124651.38b315a8adce63a37fccc60e@linux-foundation.org \
    --to=akpm@linux-foundation.org \
    --cc=david@fromorbit.com \
    --cc=linux-fsdevel@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=phdm@macqel.be \
    --cc=torvalds@linux-foundation.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).