Commit ee85e09
ext4: check stripe size compatibility on remount as well
We disable stripe size in __ext4_fill_super if it is not a multiple of
the cluster ratio however this check is missed when trying to remount.
This can leave us with cases where stripe < cluster_ratio after
remount:set making EXT4_B2C(sbi->s_stripe) become 0 that can cause some
unforeseen bugs like divide by 0.
Fix that by adding the check in remount path as well.
Reported-by: [email protected]
Tested-by: [email protected]
Reviewed-by: Kemeng Shi <[email protected]>
Reviewed-by: Ritesh Harjani (IBM) <[email protected]>
Fixes: c3defd9 ("ext4: treat stripe in block unit")
Signed-off-by: Ojaswin Mujoo <[email protected]>
Link: https://patch.msgid.link/3a493bb503c3598e25dcfbed2936bb2dff3fece7.1725002410.git.ojaswin@linux.ibm.com
Signed-off-by: Theodore Ts'o <[email protected]>1 parent cc749e6 commit ee85e09
1 file changed
+22
-7
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
5178 | 5178 | | |
5179 | 5179 | | |
5180 | 5180 | | |
| 5181 | + | |
| 5182 | + | |
| 5183 | + | |
| 5184 | + | |
| 5185 | + | |
| 5186 | + | |
| 5187 | + | |
| 5188 | + | |
| 5189 | + | |
| 5190 | + | |
| 5191 | + | |
| 5192 | + | |
5181 | 5193 | | |
5182 | 5194 | | |
5183 | 5195 | | |
| |||
5287 | 5299 | | |
5288 | 5300 | | |
5289 | 5301 | | |
5290 | | - | |
5291 | | - | |
5292 | | - | |
5293 | | - | |
5294 | | - | |
5295 | | - | |
5296 | | - | |
| 5302 | + | |
5297 | 5303 | | |
5298 | 5304 | | |
5299 | 5305 | | |
| |||
6457 | 6463 | | |
6458 | 6464 | | |
6459 | 6465 | | |
| 6466 | + | |
| 6467 | + | |
| 6468 | + | |
| 6469 | + | |
| 6470 | + | |
| 6471 | + | |
| 6472 | + | |
| 6473 | + | |
| 6474 | + | |
6460 | 6475 | | |
6461 | 6476 | | |
6462 | 6477 | | |
| |||
0 commit comments