md/raid5: replace suspend with quiesce() callback
authorYu Kuai <yukuai3@huawei.com>
Tue, 10 Oct 2023 15:19:55 +0000 (23:19 +0800)
committerSong Liu <song@kernel.org>
Wed, 11 Oct 2023 01:49:51 +0000 (18:49 -0700)
commitb42cd7b3a20db692a8d24c2c756ad5008729976b
tree2a0e31891ca1c0e7aebf36093039ee565f0f8856
parent1978c742f3e7ef359b83cb712f8559fcd32032d0
md/raid5: replace suspend with quiesce() callback

raid5 is the only personality to suspend array in check_reshape() and
start_reshape() callback, suspend and quiesce() callback can both wait
for all normal io to be done, and prevent new io to be dispatched, the
difference is that suspend is implemented in common layer, and quiesce()
callback is implemented in raid5.

In order to cleanup all the usage of mddev_suspend(), the new apis
__mddev_suspend() need to be called before 'reconfig_mutex' is held,
and it's not good to affect all the personalities in common layer just
for raid5. Hence replace suspend with quiesce() callaback, prepare to
reomove all the users of mddev_suspend().

Signed-off-by: Yu Kuai <yukuai3@huawei.com>
Signed-off-by: Song Liu <song@kernel.org>
Link: https://lore.kernel.org/r/20231010151958.145896-17-yukuai1@huaweicloud.com
drivers/md/raid5.c