Skip to contentSkip to conversation

Ext3, reiserfs, udf & isofs fixes

GIT PULL Jan Kara 2 participants 3 messages Sep 5, 2013 – Sep 9, 2013 VFS

lore
Share & tools
lore

Jan Kara

author reviewer
#0 lore raw

Hello Linus,

could you please pull from

git://git.kernel.org/pub/scm/linux/kernel/git/jack/linux-fs.git for_linus

The pull contains a bunch of ext3 cleanups and minor improvements, major reiserfs locking changes which should hopefully fix deadlocks introduced by BKL removal, and udf/isofs changes to refuse mounting fs rw instead of mounting it ro automatically which makes eject button work as expected for all media (see the changelog for why userspace should be ok with this change).

Top of the tree is 97a2847. The full shortlog is:

Eric Sandeen (1):
ext3: allow specifying external journal by pathname mount option

Jan Kara (4):
isofs: Refuse RW mount of the filesystem instead of making it RO
udf: Standardize return values in mount sequence
udf: Refuse RW mount of the filesystem instead of making it RO
Merge branch 'for-3.12' of git://git.kernel.org/.../jeffm/linux-reiserfs into for_next_testing

Jeff Mahoney (3):
reiserfs: locking, push write lock out of xattr code
reiserfs: locking, handle nested locks properly
reiserfs: locking, release lock around quota operations

Nathaniel Yazdani (1):
jbd: remove unneeded semicolon

Paul Gortmaker (2):
jbd: relocate assert after state lock in journal_commit_transaction()
jbd: use a single printk for jbd_debug()

The diffstat is

 Documentation/filesystems/ext3.txt |   7 +-
 fs/ext3/super.c                    |  43 +++++
 fs/isofs/inode.c                   |  16 +-
 fs/jbd/commit.c                    |   2 +-
 fs/jbd/journal.c                   |  18 ++
 fs/reiserfs/bitmap.c               |  22 ++-
 fs/reiserfs/dir.c                  |   7 +-
 fs/reiserfs/fix_node.c             |  26 +--
 fs/reiserfs/inode.c                | 114 ++++++-------
 fs/reiserfs/ioctl.c                |   7 +-
 fs/reiserfs/journal.c              | 104 +++++------
 fs/reiserfs/lock.c                 |  43 ++---
 fs/reiserfs/namei.c                |  24 +--
 fs/reiserfs/prints.c               |   5 +-
 fs/reiserfs/reiserfs.h             |  36 ++--
 fs/reiserfs/resize.c               |  10 +-
 fs/reiserfs/stree.c                |  74 ++++----
 fs/reiserfs/super.c                |  75 ++++----
 fs/reiserfs/xattr.c                |  46 ++---
 fs/reiserfs/xattr_acl.c            |  16 +-
 fs/udf/super.c                     | 342 ++++++++++++++++++++++---------------
 include/linux/jbd.h                |  17 +-
 22 files changed, 609 insertions(+), 445 deletions(-)

Thanks
Honza

Signature · 2 lines
Jan Kara <[email protected]>
SUSE Labs, CR
#1 lore raw
Quoted 4 lines · Jan Kara

udf/isofs changes to refuse mounting fs rw instead of mounting it ro automatically which makes eject button work as expected for all media (see the changelog for why userspace should be ok with this change).

Pulled. However, these are kind of odd.

For trying _remount_ something read-only, isofs returns the logical EROFS error code.

But for trying to mount it in the first place, it returns EACCES, which sounds insane. It's not a permission problem - no amount of permissions will ever make it work.

UDF always does EACCES, regardless of mount/remount.

Is there some fundamental reason for the insane error code? Does user space do the wrong thing if we were to just always return "EROFS" which makes much more sense?

Linus

author reviewer
#2 lore raw
Quoted 15 lines · Linus Torvalds
Quoted 4 lines · Jan Kara

udf/isofs changes to refuse mounting fs rw instead of mounting it ro automatically which makes eject button work as expected for all media (see the changelog for why userspace should be ok with this change).

Pulled. However, these are kind of odd.

For trying _remount_ something read-only, isofs returns the logical EROFS error code.

But for trying to mount it in the first place, it returns EACCES, which sounds insane. It's not a permission problem - no amount of permissions will ever make it work.

Quoted 5 lines

UDF always does EACCES, regardless of mount/remount.

Is there some fundamental reason for the insane error code? Does user space do the wrong thing if we were to just always return "EROFS" which makes much more sense?

So I personally like EROFS more as well. However blkdev_get_by_path()
(which is what mount(2) uses) returns EACCES if the device is read-only and FMODE_WRITE was requested. Also the manpage for mount(2) talks about EACCES when RW mount of read-only device was requested and doesn't mention EROFS at all.

Now mount(8) handles both EROFS and EACCES the same way but I wanted to stay on the safer side in case someone uses mount(2) directly so I used more common EACCES.

I can create a separate patch changing all EACCES return values in this area to EROFS but I'm not sure it is worth the possible hassle with userspace...

Honza

Signature · 2 lines
Jan Kara <[email protected]>
SUSE Labs, CR