linux-fsdevel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH 0/3] Fix eject button handling for RO fs
@ 2013-07-25 22:28 Jan Kara
  2013-07-25 22:28 ` [PATCH 1/3] isofs: Refuse RW mount of the filesystem instead of making it RO Jan Kara
                   ` (2 more replies)
  0 siblings, 3 replies; 5+ messages in thread
From: Jan Kara @ 2013-07-25 22:28 UTC (permalink / raw)
  To: linux-fsdevel; +Cc: Hui Wang, Tejun Heo, viro, kzak


  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


^ permalink raw reply	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2013-07-31 20:16 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2013-07-25 22:28 [PATCH 0/3] Fix eject button handling for RO fs Jan Kara
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

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).