[PATCH 0/3] Fix eject button handling for RO fs

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



  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

--
To unsubscribe from this list: send the line "unsubscribe linux-fsdevel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html




[Index of Archives]     [Linux Ext4 Filesystem]     [Union Filesystem]     [Filesystem Testing]     [Ceph Users]     [Ecryptfs]     [AutoFS]     [Kernel Newbies]     [Share Photos]     [Security]     [Netfilter]     [Bugtraq]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux Cachefs]     [Reiser Filesystem]     [Linux RAID]     [Samba]     [Device Mapper]     [CEPH Development]
  Powered by Linux