aboutsummaryrefslogtreecommitdiffstats
path: root/fs/ubifs/commit.c
diff options
context:
space:
mode:
authorYu Kuai <[email protected]>2023-12-07 02:07:24 +0000
committerSong Liu <[email protected]>2023-12-07 18:19:47 +0000
commitb39113349de60e9b0bc97c2e129181b193c45054 (patch)
tree16d09c2bb9b60da6a0afa203087edb9b62f81154 /fs/ubifs/commit.c
parentmd: fix stopping sync thread (diff)
downloadkernel-b39113349de60e9b0bc97c2e129181b193c45054.tar.gz
kernel-b39113349de60e9b0bc97c2e129181b193c45054.zip
md: split MD_RECOVERY_NEEDED out of mddev_resume
New mddev_resume() calls are added to synchronize IO with array reconfiguration, however, this introduces a performance regression while adding it in md_start_sync(): 1) someone sets MD_RECOVERY_NEEDED first; 2) daemon thread grabs reconfig_mutex, then clears MD_RECOVERY_NEEDED and queues a new sync work; 3) daemon thread releases reconfig_mutex; 4) in md_start_sync a) check that there are spares that can be added/removed, then suspend the array; b) remove_and_add_spares may not be called, or called without really add/remove spares; c) resume the array, then set MD_RECOVERY_NEEDED again! Loop between 2 - 4, then mddev_suspend() will be called quite often, for consequence, normal IO will be quite slow. Fix this problem by don't set MD_RECOVERY_NEEDED again in md_start_sync(), hence the loop will be broken. Fixes: bc08041b32ab ("md: suspend array in md_start_sync() if array need reconfiguration") Suggested-by: Song Liu <[email protected]> Reported-by: Janpieter Sollie <[email protected]> Closes: https://bugzilla.kernel.org/show_bug.cgi?id=218200 Signed-off-by: Yu Kuai <[email protected]> Signed-off-by: Song Liu <[email protected]> Link: https://lore.kernel.org/r/[email protected]
Diffstat (limited to 'fs/ubifs/commit.c')
0 files changed, 0 insertions, 0 deletions