]> git.baikalelectronics.ru Git - kernel.git/commit
ext4: make mb_optimize_scan option work with set/unset mount cmd
authorOjaswin Mujoo <ojaswin@linux.ibm.com>
Tue, 8 Mar 2022 09:52:00 +0000 (15:22 +0530)
committerTheodore Ts'o <tytso@mit.edu>
Sun, 13 Mar 2022 01:54:19 +0000 (20:54 -0500)
commit73fc140a144daa5163f73772def3cf1c1a46229e
tree6ec7f459bc624479c34b401b09dcef4af261b38f
parentf2d9d6f517228f500d1e5a7128741b147922dab0
ext4: make mb_optimize_scan option work with set/unset mount cmd

After moving to the new mount API, mb_optimize_scan mount option
handling was not working as expected due to the parsed value always
being overwritten by default. Refactor and fix this to the expected
behavior described below:

*  mb_optimize_scan=1 - On
*  mb_optimize_scan=0 - Off
*  mb_optimize_scan not passed - On if no. of BGs > threshold else off
*  Remounts retain previous value unless we explicitly pass the option
   with a new value

Fixes: 702ba83a739f ("ext4: switch to the new mount api")
Cc: stable@kernel.org
Reported-by: Ritesh Harjani <riteshh@linux.ibm.com>
Signed-off-by: Ojaswin Mujoo <ojaswin@linux.ibm.com>
Reviewed-by: Ritesh Harjani <riteshh@linux.ibm.com>
Link: https://lore.kernel.org/r/c98970fe99f26718586d02e942f293300fb48ef3.1646732698.git.ojaswin@linux.ibm.com
Signed-off-by: Theodore Ts'o <tytso@mit.edu>
fs/ext4/super.c