md/md-faulty: enable io accounting
use md_account_bio() to enable io accounting, also make sure mddev_suspend() will wait for all io to be done. Signed-off-by: Yu Kuai <yukuai3@huawei.com> Reviewed-by: Xiao Ni <xni@redhat.com> Signed-off-by: Song Liu <song@kernel.org> Link: https://lore.kernel.org/r/20230621165110.1498313-9-yukuai1@huaweicloud.com
This commit is contained in:
parent
09f43cb530
commit
dd9a686014
@ -204,6 +204,8 @@ static bool faulty_make_request(struct mddev *mddev, struct bio *bio)
|
|||||||
failit = 1;
|
failit = 1;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
md_account_bio(mddev, &bio);
|
||||||
if (failit) {
|
if (failit) {
|
||||||
struct bio *b = bio_alloc_clone(conf->rdev->bdev, bio, GFP_NOIO,
|
struct bio *b = bio_alloc_clone(conf->rdev->bdev, bio, GFP_NOIO,
|
||||||
&mddev->bio_set);
|
&mddev->bio_set);
|
||||||
|
Loading…
Reference in New Issue
Block a user