From: Mike Snitzer snitzer@redhat.com
mainline inclusion from mainline-v5.17-rc2 commit f524d9c95fab54783d0038f7a3e8c014d5b56857 category: bugfix bugzilla: 189706, https://gitee.com/openeuler/kernel/issues/I9BD67
Reference: https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/commit/?i...
--------------------------------
Reverts a1e1cb72d9649 ("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: Mike Snitzer snitzer@redhat.com Link: https://lore.kernel.org/r/20220128155841.39644-3-snitzer@redhat.com Signed-off-by: Jens Axboe axboe@kernel.dk
Conflict: drivers/md/dm.c Context changed, do not affect the logic of the code.
Signed-off-by: Li Nan linan122@huawei.com --- drivers/md/dm.c | 15 --------------- 1 file changed, 15 deletions(-)
diff --git a/drivers/md/dm.c b/drivers/md/dm.c index 654aae1dd777..1c79eaede4df 100644 --- a/drivers/md/dm.c +++ b/drivers/md/dm.c @@ -1610,9 +1610,6 @@ static void init_clone_info(struct clone_info *ci, struct mapped_device *md, 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. */ @@ -1650,18 +1647,6 @@ static blk_qc_t __split_and_process_bio(struct mapped_device *md, GFP_NOIO, &md->queue->bio_split); 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); trace_block_split(md->queue, b, bio->bi_iter.bi_sector); ret = submit_bio_noacct(bio);
反馈: 您发送到kernel@openeuler.org的补丁/补丁集,已成功转换为PR! PR链接地址: https://gitee.com/openeuler/kernel/pulls/5518 邮件列表地址:https://mailweb.openeuler.org/hyperkitty/list/kernel@openeuler.org/message/I...
FeedBack: The patch(es) which you have sent to kernel@openeuler.org mailing list has been converted to a pull request successfully! Pull request link: https://gitee.com/openeuler/kernel/pulls/5518 Mailing list address: https://mailweb.openeuler.org/hyperkitty/list/kernel@openeuler.org/message/I...