Files
twx-linux/fs
Zhang Yi e7ff7500bb ext4: fix incorrect options show of original mount_opt and extend mount_opt2
[ Upstream commit e3645d72f8 ]

Current _ext4_show_options() do not distinguish MOPT_2 flag, so it mixed
extend sbi->s_mount_opt2 options with sbi->s_mount_opt, it could lead to
show incorrect options, e.g. show fc_debug_force if we mount with
errors=continue mode and miss it if we set.

  $ mkfs.ext4 /dev/pmem0
  $ mount -o errors=remount-ro /dev/pmem0 /mnt
  $ cat /proc/fs/ext4/pmem0/options | grep fc_debug_force
    #empty
  $ mount -o remount,errors=continue /mnt
  $ cat /proc/fs/ext4/pmem0/options | grep fc_debug_force
    fc_debug_force
  $ mount -o remount,errors=remount-ro,fc_debug_force /mnt
  $ cat /proc/fs/ext4/pmem0/options | grep fc_debug_force
    #empty

Fixes: 995a3ed67f ("ext4: add fast_commit feature and handling for extended mount options")
Signed-off-by: Zhang Yi <yi.zhang@huawei.com>
Reviewed-by: Jan Kara <jack@suse.cz>
Link: https://lore.kernel.org/r/20230129034939.3702550-1-yi.zhang@huaweicloud.com
Signed-off-by: Theodore Ts'o <tytso@mit.edu>
Signed-off-by: Sasha Levin <sashal@kernel.org>
2023-03-11 13:50:33 +01:00
..
2023-01-31 16:44:08 -08:00
2022-12-11 18:12:18 -08:00
2023-03-10 09:28:46 +01:00
2023-03-10 09:28:40 +01:00
2022-12-11 18:12:18 -08:00
2023-03-10 09:28:46 +01:00
2023-01-05 07:34:21 -08:00
2023-02-03 17:52:24 -08:00
2022-12-21 14:45:25 +01:00