md: initialize 'active_io' while allocating mddev
authorYu Kuai <yukuai3@huawei.com>
Fri, 25 Aug 2023 03:09:50 +0000 (11:09 +0800)
committerSong Liu <song@kernel.org>
Fri, 22 Sep 2023 17:28:26 +0000 (10:28 -0700)
commitd58eff83bd3c6166944f6b159544438385d48549
treedca3c35f545f70bdfca369f679342dc784739a99
parent81e2ce1b3d5a896e24fe5af83896fec057860a25
md: initialize 'active_io' while allocating mddev

'active_io' is used for mddev_suspend() and it's initialized in
md_run(), this restrict that 'reconfig_mutex' must be held and
"mddev->pers" must be set before calling mddev_suspend().

Initialize 'active_io' early so that mddev_suspend() is safe to call
once mddev is allocated, this will be helpful to refactor
mddev_suspend() in following patches.

Signed-off-by: Yu Kuai <yukuai3@huawei.com>
Signed-off-by: Song Liu <song@kernel.org>
Link: https://lore.kernel.org/r/20230825030956.1527023-2-yukuai1@huaweicloud.com
drivers/md/dm-raid.c
drivers/md/md.c
drivers/md/md.h