From: Jan Kara <jack@suse.cz>
To: linux-fsdevel@vger.kernel.org
Cc: Hui Wang <hui.wang@canonical.com>, Tejun Heo <tj@kernel.org>,
viro@zeniv.linux.org.uk, kzak@redhat.com
Subject: [PATCH 0/3] Fix eject button handling for RO fs
Date: Fri, 26 Jul 2013 00:28:10 +0200 [thread overview]
Message-ID: <1374791293-19140-1-git-send-email-jack@suse.cz> (raw)
Hello,
As Hui Wang reported, there is a problem with handling of eject button
for read-write media (i.e. CD-RW & DVD-RW). Although these are mounted
read-only, block layer thinks they are used read-write (unlike the case
when the media is normal CD or DVD disk) and thus blocks the eject
button. This appears inconsistent to users and as Hui reports it is a
regression against pre-3.0 kernels.
Tejun suggested we can always use read-only access when filesystem is
going to be used read-only. With iso9660 this would work as it is always
read-only. But for udf this doesn't work as it can be used read-write.
Whether it is read-only or read-write depends on filesystem features so
we cannot tell before reading the disk.
The solution I've taken is that we return EACCES if we are asked to
mount a filesystem which can be mounted only read-only without MS_RDONLY
set (so far we just silently set the MS_RDONLY flag during mount). This
is userspace visible change which is why I'm CCing more people than
usual. But I'm convinced we should be fine for several reasons:
1) The behavior isn't new - when the media is read-only, userspace will
already get EACCES when trying to mount it without MS_RDONLY set.
2) mount(8) retries with MS_RDONLY set when it gets EACCESS.
3) mount(2) manpage documents this behavior.
If noone will object to this change, I'll push the patches via my tree
to Linus.
Honza
next reply other threads:[~2013-07-25 22:28 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-07-25 22:28 Jan Kara [this message]
2013-07-25 22:28 ` [PATCH 1/3] isofs: Refuse RW mount of the filesystem instead of making it RO Jan Kara
2013-07-31 20:16 ` Jan Kara
2013-07-25 22:28 ` [PATCH 2/3] udf: Standardize return values in mount sequence Jan Kara
2013-07-25 22:28 ` [PATCH 3/3] udf: Refuse RW mount of the filesystem instead of making it RO Jan Kara
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=1374791293-19140-1-git-send-email-jack@suse.cz \
--to=jack@suse.cz \
--cc=hui.wang@canonical.com \
--cc=kzak@redhat.com \
--cc=linux-fsdevel@vger.kernel.org \
--cc=tj@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).