linux-block.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH v3] block: copy ioprio in __bio_clone_fast()
@ 2018-11-12  9:29 Jean Delvare
  2018-11-12 17:36 ` Jens Axboe
  0 siblings, 1 reply; 2+ messages in thread
From: Jean Delvare @ 2018-11-12  9:29 UTC (permalink / raw)
  To: linux-block; +Cc: Jens Axboe, Hannes Reinecke

From: Hannes Reinecke <hare@suse.com>

We need to copy the io priority, too; otherwise the clone will run
with a different priority than the original one.

Fixes: 43b62ce3ff0a ("block: move bio io prio to a new field")
Signed-off-by: Hannes Reinecke <hare@suse.com>
Signed-off-by: Jean Delvare <jdelvare@suse.de>
---
Changes since v2:
 * Rebased on kernel v4.20-rc2.

 block/bio.c    |    1 +
 block/bounce.c |    1 +
 2 files changed, 2 insertions(+)

--- linux-4.20-rc2.orig/block/bio.c	2018-11-12 10:00:34.875181186 +0100
+++ linux-4.20-rc2/block/bio.c	2018-11-12 10:00:42.804275169 +0100
@@ -608,6 +608,7 @@ void __bio_clone_fast(struct bio *bio, s
 	bio->bi_write_hint = bio_src->bi_write_hint;
 	bio->bi_iter = bio_src->bi_iter;
 	bio->bi_io_vec = bio_src->bi_io_vec;
+	bio->bi_ioprio = bio_src->bi_ioprio;
 
 	bio_clone_blkcg_association(bio, bio_src);
 }
--- linux-4.20-rc2.orig/block/bounce.c	2018-11-12 09:34:19.478031060 +0100
+++ linux-4.20-rc2/block/bounce.c	2018-11-12 10:04:25.742906302 +0100
@@ -251,6 +251,7 @@ static struct bio *bounce_clone_bio(stru
 	bio->bi_write_hint	= bio_src->bi_write_hint;
 	bio->bi_iter.bi_sector	= bio_src->bi_iter.bi_sector;
 	bio->bi_iter.bi_size	= bio_src->bi_iter.bi_size;
+	bio->bi_ioprio		= bio_src->bi_ioprio;
 
 	switch (bio_op(bio)) {
 	case REQ_OP_DISCARD:


-- 
Jean Delvare
SUSE L3 Support

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

* Re: [PATCH v3] block: copy ioprio in __bio_clone_fast()
  2018-11-12  9:29 [PATCH v3] block: copy ioprio in __bio_clone_fast() Jean Delvare
@ 2018-11-12 17:36 ` Jens Axboe
  0 siblings, 0 replies; 2+ messages in thread
From: Jens Axboe @ 2018-11-12 17:36 UTC (permalink / raw)
  To: Jean Delvare, linux-block; +Cc: Hannes Reinecke

On 11/12/18 2:29 AM, Jean Delvare wrote:
> From: Hannes Reinecke <hare@suse.com>
> 
> We need to copy the io priority, too; otherwise the clone will run
> with a different priority than the original one.

Applied, thanks.

-- 
Jens Axboe


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

end of thread, other threads:[~2018-11-12 17:36 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2018-11-12  9:29 [PATCH v3] block: copy ioprio in __bio_clone_fast() Jean Delvare
2018-11-12 17:36 ` 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).