]> git.baikalelectronics.ru Git - kernel.git/commit
ext4: force ro mount if ext4_setup_super() fails
authorEric Sandeen <sandeen@redhat.com>
Mon, 28 May 2012 18:17:25 +0000 (14:17 -0400)
committerTheodore Ts'o <tytso@mit.edu>
Mon, 28 May 2012 18:17:25 +0000 (14:17 -0400)
commit606a117e3a5e9dba3c31f2aeb20c56d4e9885893
tree8ca466c423bf9cea3722aa04349b41ee062a18e4
parent739f1cb14d6231faac02ef738c8caecc5e8e9683
ext4: force ro mount if ext4_setup_super() fails

If ext4_setup_super() fails i.e. due to a too-high revision,
the error is logged in dmesg but the fs is not mounted RO as
indicated.

Tested by:

# mkfs.ext4 -r 4 /dev/sdb6
# mount /dev/sdb6 /mnt/test
# dmesg | grep "too high"
[164919.759248] EXT4-fs (sdb6): revision level too high, forcing read-only mode
# grep sdb6 /proc/mounts
/dev/sdb6 /mnt/test2 ext4 rw,seclabel,relatime,data=ordered 0 0

Reviewed-by: Andreas Dilger <adilger@whamcloud.com>
Signed-off-by: Eric Sandeen <sandeen@redhat.com>
Signed-off-by: "Theodore Ts'o" <tytso@mit.edu>
Cc: stable@kernel.org
fs/ext4/super.c