linux-raid.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: dannyshih <dannyshih@synology.com>
To: axboe@kernel.dk
Cc: agk@redhat.com, snitzer@redhat.com, dm-devel@redhat.com,
	song@kernel.org, linux-block@vger.kernel.org,
	linux-raid@vger.kernel.org, Danny Shih <dannyshih@synology.com>
Subject: [PATCH 2/4] block: use submit_bio_noacct_add_head for split bio sending back
Date: Tue, 29 Dec 2020 17:18:40 +0800	[thread overview]
Message-ID: <1609233522-25837-3-git-send-email-dannyshih@synology.com> (raw)
In-Reply-To: <1609233522-25837-1-git-send-email-dannyshih@synology.com>

From: Danny Shih <dannyshih@synology.com>

Use submit_bio_noacct_add_head when sending split bio back to itself.
Otherwise, it might be handled after the lately split bio.

Signed-off-by: Danny Shih <dannyshih@synology.com>
Reviewed-by: Allen Peng <allenpeng@synology.com>
Reviewed-by: Alex Wu <alexwu@synology.com>
---
 block/blk-merge.c | 2 +-
 block/bounce.c    | 2 +-
 2 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/block/blk-merge.c b/block/blk-merge.c
index 808768f..e6ddcef0 100644
--- a/block/blk-merge.c
+++ b/block/blk-merge.c
@@ -347,7 +347,7 @@ void __blk_queue_split(struct bio **bio, unsigned int *nr_segs)
 
 		bio_chain(split, *bio);
 		trace_block_split(split, (*bio)->bi_iter.bi_sector);
-		submit_bio_noacct(*bio);
+		submit_bio_noacct_add_head(*bio);
 		*bio = split;
 	}
 }
diff --git a/block/bounce.c b/block/bounce.c
index d3f51ac..0b4db65 100644
--- a/block/bounce.c
+++ b/block/bounce.c
@@ -308,7 +308,7 @@ static void __blk_queue_bounce(struct request_queue *q, struct bio **bio_orig,
 	if (!passthrough && sectors < bio_sectors(*bio_orig)) {
 		bio = bio_split(*bio_orig, sectors, GFP_NOIO, &bounce_bio_split);
 		bio_chain(bio, *bio_orig);
-		submit_bio_noacct(*bio_orig);
+		submit_bio_noacct_add_head(*bio_orig);
 		*bio_orig = bio;
 	}
 	bio = bounce_clone_bio(*bio_orig, GFP_NOIO, passthrough ? NULL :
-- 
2.7.4


  parent reply	other threads:[~2020-12-29  9:29 UTC|newest]

Thread overview: 13+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-12-29  9:18 [PATCH 0/4] Fix order when split bio and send remaining back to itself dannyshih
2020-12-29  9:18 ` [PATCH 1/4] block: introduce submit_bio_noacct_add_head dannyshih
2020-12-30  0:00   ` John Stoffel
2020-12-30  9:51     ` Danny Shih
2020-12-30 17:06       ` John Stoffel
2020-12-30 17:53         ` antlists
2020-12-30 11:35     ` antlists
2020-12-30 16:53       ` John Stoffel
2020-12-29  9:18 ` dannyshih [this message]
2020-12-29  9:18 ` [PATCH 3/4] dm: use submit_bio_noacct_add_head for split bio sending back dannyshih
2020-12-29  9:18 ` [PATCH 4/4] md: " dannyshih
2020-12-30 23:34 ` [PATCH 0/4] Fix order when split bio and send remaining back to itself Mike Snitzer
2020-12-31  8:28   ` Danny Shih

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1609233522-25837-3-git-send-email-dannyshih@synology.com \
    --to=dannyshih@synology.com \
    --cc=agk@redhat.com \
    --cc=axboe@kernel.dk \
    --cc=dm-devel@redhat.com \
    --cc=linux-block@vger.kernel.org \
    --cc=linux-raid@vger.kernel.org \
    --cc=snitzer@redhat.com \
    --cc=song@kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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).