mirror of
https://mirrors.bfsu.edu.cn/git/linux.git
synced 2024-12-14 22:44:27 +08:00
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
This commit is contained in:
parent
bdf2b52136
commit
09f43cb530
@ -238,6 +238,7 @@ static bool linear_make_request(struct mddev *mddev, struct bio *bio)
|
|||||||
bio = split;
|
bio = split;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
md_account_bio(mddev, &bio);
|
||||||
bio_set_dev(bio, tmp_dev->rdev->bdev);
|
bio_set_dev(bio, tmp_dev->rdev->bdev);
|
||||||
bio->bi_iter.bi_sector = bio->bi_iter.bi_sector -
|
bio->bi_iter.bi_sector = bio->bi_iter.bi_sector -
|
||||||
start_sector + data_offset;
|
start_sector + data_offset;
|
||||||
|
Loading…
Reference in New Issue
Block a user