linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] block: fix missing blkcg_bio_issue_init
@ 2022-07-13 14:02 Muchun Song
  2022-07-14 16:54 ` Jens Axboe
  0 siblings, 1 reply; 2+ messages in thread
From: Muchun Song @ 2022-07-13 14:02 UTC (permalink / raw)
  To: axboe, snitzer; +Cc: linux-block, linux-kernel, hch, Muchun Song

The commit 513616843d73 ("block: remove superfluous calls to
blkcg_bio_issue_init") has removed blkcg_bio_issue_init from
__bio_clone since submit_bio will override ->bi_issue.
However, __blk_queue_split is called after blkcg_bio_issue_init
(see blk_mq_submit_bio) in submit_bio. In this case, the
->bi_issue is 0. Fix it.

Fixes: 513616843d73 ("block: remove superfluous calls to blkcg_bio_issue_init")
Signed-off-by: Muchun Song <songmuchun@bytedance.com>
---
 block/blk-merge.c | 1 +
 1 file changed, 1 insertion(+)

diff --git a/block/blk-merge.c b/block/blk-merge.c
index 5abf5aa5a5f0..a5bfe7f18f42 100644
--- a/block/blk-merge.c
+++ b/block/blk-merge.c
@@ -355,6 +355,7 @@ void __blk_queue_split(struct request_queue *q, struct bio **bio,
 		/* there isn't chance to merge the splitted bio */
 		split->bi_opf |= REQ_NOMERGE;
 
+		blkcg_bio_issue_init(split);
 		bio_chain(split, *bio);
 		trace_block_split(split, (*bio)->bi_iter.bi_sector);
 		submit_bio_noacct(*bio);
-- 
2.11.0


^ permalink raw reply related	[flat|nested] 2+ messages in thread

* Re: [PATCH] block: fix missing blkcg_bio_issue_init
  2022-07-13 14:02 [PATCH] block: fix missing blkcg_bio_issue_init Muchun Song
@ 2022-07-14 16:54 ` Jens Axboe
  0 siblings, 0 replies; 2+ messages in thread
From: Jens Axboe @ 2022-07-14 16:54 UTC (permalink / raw)
  To: songmuchun, snitzer; +Cc: linux-block, Christoph Hellwig, linux-kernel

On Wed, 13 Jul 2022 22:02:26 +0800, Muchun Song wrote:
> The commit 513616843d73 ("block: remove superfluous calls to
> blkcg_bio_issue_init") has removed blkcg_bio_issue_init from
> __bio_clone since submit_bio will override ->bi_issue.
> However, __blk_queue_split is called after blkcg_bio_issue_init
> (see blk_mq_submit_bio) in submit_bio. In this case, the
> ->bi_issue is 0. Fix it.
> 
> [...]

Applied, thanks!

[1/1] block: fix missing blkcg_bio_issue_init
      commit: 957a2b345cbcf41b4b25d471229f0e35262f066c

Best regards,
-- 
Jens Axboe



^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2022-07-14 16:55 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-07-13 14:02 [PATCH] block: fix missing blkcg_bio_issue_init Muchun Song
2022-07-14 16:54 ` Jens Axboe

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).