summaryrefslogtreecommitdiffstats
path: root/drivers/md/md-linear.c
diff options
context:
space:
mode:
authorYu Kuai <yukuai3@huawei.com>2023-06-21 18:51:09 +0200
committerSong Liu <song@kernel.org>2023-07-27 09:13:30 +0200
commit09f43cb530b03e4d58b35a39e54de658fc8d09b7 (patch)
tree4b36f4881deb294dc303016dba38830069148e07 /drivers/md/md-linear.c
parentmd/md-multipath: enable io accounting (diff)
downloadlinux-09f43cb530b03e4d58b35a39e54de658fc8d09b7.tar.xz
linux-09f43cb530b03e4d58b35a39e54de658fc8d09b7.zip
md/md-linear: 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-8-yukuai1@huaweicloud.com
Diffstat (limited to '')
-rw-r--r--drivers/md/md-linear.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/drivers/md/md-linear.c b/drivers/md/md-linear.c
index 4eb72b9dd933..71ac99646827 100644
--- a/drivers/md/md-linear.c
+++ b/drivers/md/md-linear.c
@@ -238,6 +238,7 @@ static bool linear_make_request(struct mddev *mddev, struct bio *bio)
bio = split;
}
+ md_account_bio(mddev, &bio);
bio_set_dev(bio, tmp_dev->rdev->bdev);
bio->bi_iter.bi_sector = bio->bi_iter.bi_sector -
start_sector + data_offset;