Commit f524d9c9 authored by Mike Snitzer's avatar Mike Snitzer Committed by Jens Axboe

dm: revert partial fix for redundant bio-based IO accounting

Reverts a1e1cb72 ("dm: fix redundant IO accounting for bios that
need splitting") because it was too narrow in scope (only addressed
redundant 'sectors[]' accounting and not ios, nsecs[], etc).

Cc: stable@vger.kernel.org
Signed-off-by: default avatarMike Snitzer <snitzer@redhat.com>
Link: https://lore.kernel.org/r/20220128155841.39644-3-snitzer@redhat.comSigned-off-by: default avatarJens Axboe <axboe@kernel.dk>
parent e45c47d1
...@@ -1442,9 +1442,6 @@ static void init_clone_info(struct clone_info *ci, struct mapped_device *md, ...@@ -1442,9 +1442,6 @@ static void init_clone_info(struct clone_info *ci, struct mapped_device *md,
ci->sector = bio->bi_iter.bi_sector; ci->sector = bio->bi_iter.bi_sector;
} }
#define __dm_part_stat_sub(part, field, subnd) \
(part_stat_get(part, field) -= (subnd))
/* /*
* Entry point to split a bio into clones and submit them to the targets. * Entry point to split a bio into clones and submit them to the targets.
*/ */
...@@ -1480,18 +1477,6 @@ static void __split_and_process_bio(struct mapped_device *md, ...@@ -1480,18 +1477,6 @@ static void __split_and_process_bio(struct mapped_device *md,
GFP_NOIO, &md->queue->bio_split); GFP_NOIO, &md->queue->bio_split);
ci.io->orig_bio = b; ci.io->orig_bio = b;
/*
* Adjust IO stats for each split, otherwise upon queue
* reentry there will be redundant IO accounting.
* NOTE: this is a stop-gap fix, a proper fix involves
* significant refactoring of DM core's bio splitting
* (by eliminating DM's splitting and just using bio_split)
*/
part_stat_lock();
__dm_part_stat_sub(dm_disk(md)->part0,
sectors[op_stat_group(bio_op(bio))], ci.sector_count);
part_stat_unlock();
bio_chain(b, bio); bio_chain(b, bio);
trace_block_split(b, bio->bi_iter.bi_sector); trace_block_split(b, bio->bi_iter.bi_sector);
submit_bio_noacct(bio); submit_bio_noacct(bio);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment