summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorYu Kuai <yukuai3@huawei.com>2023-06-22 00:51:10 +0800
committerSong Liu <song@kernel.org>2023-07-27 00:13:30 -0700
commitdd9a68601409d905810a936a7c4e1241b604013f (patch)
treed41af01b2920455b0d69a748bcde947db777ae57
parent09f43cb530b03e4d58b35a39e54de658fc8d09b7 (diff)
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
-rw-r--r--drivers/md/md-faulty.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/drivers/md/md-faulty.c b/drivers/md/md-faulty.c
index 50ad818978a4..a039e8e20f55 100644
--- a/drivers/md/md-faulty.c
+++ b/drivers/md/md-faulty.c
@@ -204,6 +204,8 @@ static bool faulty_make_request(struct mddev *mddev, struct bio *bio)
failit = 1;
}
}
+
+ md_account_bio(mddev, &bio);
if (failit) {
struct bio *b = bio_alloc_clone(conf->rdev->bdev, bio, GFP_NOIO,
&mddev->bio_set);