diff options
author | Yu Kuai <yukuai3@huawei.com> | 2023-06-22 00:51:06 +0800 |
---|---|---|
committer | Song Liu <song@kernel.org> | 2023-07-27 00:13:29 -0700 |
commit | bb2a9acefaf9ce5bbc1e70f407e34599233d0243 (patch) | |
tree | 7bdb12ee324e422942e52a18d0c2640c00f40756 /drivers/md/raid1.h | |
parent | 05048cbccab79e9fb9030274170ccd710fe69474 (diff) |
md/raid1: switch to use md_account_bio() for io accounting
Two problems can be fixed this way:
1) 'active_io' will represent inflight io instead of io that is
dispatching.
2) If io accounting is enabled or disabled while io is still inflight,
bio_start_io_acct() and bio_end_io_acct() is not balanced and io
inflight counter will be leaked.
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-5-yukuai1@huaweicloud.com
Diffstat (limited to 'drivers/md/raid1.h')
-rw-r--r-- | drivers/md/raid1.h | 1 |
1 files changed, 0 insertions, 1 deletions
diff --git a/drivers/md/raid1.h b/drivers/md/raid1.h index 468f189da7a0..14d4211a123a 100644 --- a/drivers/md/raid1.h +++ b/drivers/md/raid1.h @@ -157,7 +157,6 @@ struct r1bio { sector_t sector; int sectors; unsigned long state; - unsigned long start_time; struct mddev *mddev; /* * original bio going to /dev/mdx |