Commit e3645d7
ext4: fix incorrect options show of original mount_opt and extend mount_opt2
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: 995a3ed ("ext4: add fast_commit feature and handling for extended mount options")
Signed-off-by: Zhang Yi <[email protected]>
Reviewed-by: Jan Kara <[email protected]>
Link: https://lore.kernel.org/r/[email protected]
Signed-off-by: Theodore Ts'o <[email protected]>1 parent 0813299 commit e3645d7
2 files changed
+22
-7
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1529 | 1529 | | |
1530 | 1530 | | |
1531 | 1531 | | |
| 1532 | + | |
1532 | 1533 | | |
1533 | 1534 | | |
1534 | 1535 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
2894 | 2894 | | |
2895 | 2895 | | |
2896 | 2896 | | |
2897 | | - | |
| 2897 | + | |
2898 | 2898 | | |
2899 | 2899 | | |
2900 | 2900 | | |
| |||
2906 | 2906 | | |
2907 | 2907 | | |
2908 | 2908 | | |
| 2909 | + | |
| 2910 | + | |
| 2911 | + | |
2909 | 2912 | | |
2910 | 2913 | | |
2911 | 2914 | | |
2912 | | - | |
2913 | | - | |
| 2915 | + | |
| 2916 | + | |
| 2917 | + | |
| 2918 | + | |
| 2919 | + | |
| 2920 | + | |
| 2921 | + | |
| 2922 | + | |
| 2923 | + | |
| 2924 | + | |
| 2925 | + | |
| 2926 | + | |
2914 | 2927 | | |
2915 | | - | |
2916 | | - | |
2917 | | - | |
| 2928 | + | |
| 2929 | + | |
| 2930 | + | |
2918 | 2931 | | |
2919 | 2932 | | |
2920 | 2933 | | |
| |||
2942 | 2955 | | |
2943 | 2956 | | |
2944 | 2957 | | |
2945 | | - | |
| 2958 | + | |
2946 | 2959 | | |
2947 | 2960 | | |
2948 | 2961 | | |
| |||
5081 | 5094 | | |
5082 | 5095 | | |
5083 | 5096 | | |
| 5097 | + | |
5084 | 5098 | | |
5085 | 5099 | | |
5086 | 5100 | | |
| |||
0 commit comments