Skip to content

Commit f524d9c

Browse files
snitmaxboe
authored andcommitted
dm: revert partial fix for redundant bio-based IO accounting
Reverts a1e1cb7 ("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: [email protected] Signed-off-by: Mike Snitzer <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Jens Axboe <[email protected]>
1 parent e45c47d commit f524d9c

File tree

1 file changed

+0
-15
lines changed

1 file changed

+0
-15
lines changed

drivers/md/dm.c

Lines changed: 0 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -1442,9 +1442,6 @@ static void init_clone_info(struct clone_info *ci, struct mapped_device *md,
14421442
ci->sector = bio->bi_iter.bi_sector;
14431443
}
14441444

1445-
#define __dm_part_stat_sub(part, field, subnd) \
1446-
(part_stat_get(part, field) -= (subnd))
1447-
14481445
/*
14491446
* Entry point to split a bio into clones and submit them to the targets.
14501447
*/
@@ -1480,18 +1477,6 @@ static void __split_and_process_bio(struct mapped_device *md,
14801477
GFP_NOIO, &md->queue->bio_split);
14811478
ci.io->orig_bio = b;
14821479

1483-
/*
1484-
* Adjust IO stats for each split, otherwise upon queue
1485-
* reentry there will be redundant IO accounting.
1486-
* NOTE: this is a stop-gap fix, a proper fix involves
1487-
* significant refactoring of DM core's bio splitting
1488-
* (by eliminating DM's splitting and just using bio_split)
1489-
*/
1490-
part_stat_lock();
1491-
__dm_part_stat_sub(dm_disk(md)->part0,
1492-
sectors[op_stat_group(bio_op(bio))], ci.sector_count);
1493-
part_stat_unlock();
1494-
14951480
bio_chain(b, bio);
14961481
trace_block_split(b, bio->bi_iter.bi_sector);
14971482
submit_bio_noacct(bio);

0 commit comments

Comments
 (0)