diff mbox series

[05/10] block: initialize the write priority in blk_rq_bio_prep

Message ID 20190513063754.1520-6-hch@lst.de (mailing list archive)
State New, archived
Headers show
Series [01/10] block: don't decrement nr_phys_segments for physically contigous segments | expand

Commit Message

Christoph Hellwig May 13, 2019, 6:37 a.m. UTC
The priority fiel also make sense for passthrough requests, so
initialize it in blk_rq_bio_prep.

Signed-off-by: Christoph Hellwig <hch@lst.de>
---
 block/blk-core.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

Comments

Minwoo Im May 13, 2019, 7:34 a.m. UTC | #1
> The priority fiel also make sense for passthrough requests, so
                           ^^^^
                       `s/fiel/field`
I think it's trivial so that it can be done with merging.
Chaitanya Kulkarni May 13, 2019, 3:04 p.m. UTC | #2
With 's/fiel/field' can be done at the time of merge, looks good.

Reviewed-by: Chaitanya Kulkarni <chaitanya.kulkarni@wdc.com>

On 05/12/2019 11:38 PM, Christoph Hellwig wrote:
> The priority fiel also make sense for passthrough requests, so
> initialize it in blk_rq_bio_prep.
>
> Signed-off-by: Christoph Hellwig <hch@lst.de>
> ---
>   block/blk-core.c | 2 +-
>   1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/block/blk-core.c b/block/blk-core.c
> index 419d600e6637..7fb394dd3e11 100644
> --- a/block/blk-core.c
> +++ b/block/blk-core.c
> @@ -716,7 +716,6 @@ void blk_init_request_from_bio(struct request *req, struct bio *bio)
>   		req->cmd_flags |= REQ_FAILFAST_MASK;
>
>   	req->__sector = bio->bi_iter.bi_sector;
> -	req->ioprio = bio_prio(bio);
>   	req->write_hint = bio->bi_write_hint;
>   	blk_rq_bio_prep(req->q, req, bio);
>   }
> @@ -1494,6 +1493,7 @@ void blk_rq_bio_prep(struct request_queue *q, struct request *rq,
>
>   	rq->__data_len = bio->bi_iter.bi_size;
>   	rq->bio = rq->biotail = bio;
> +	rq->ioprio = bio_prio(bio);
>
>   	if (bio->bi_disk)
>   		rq->rq_disk = bio->bi_disk;
>
diff mbox series

Patch

diff --git a/block/blk-core.c b/block/blk-core.c
index 419d600e6637..7fb394dd3e11 100644
--- a/block/blk-core.c
+++ b/block/blk-core.c
@@ -716,7 +716,6 @@  void blk_init_request_from_bio(struct request *req, struct bio *bio)
 		req->cmd_flags |= REQ_FAILFAST_MASK;
 
 	req->__sector = bio->bi_iter.bi_sector;
-	req->ioprio = bio_prio(bio);
 	req->write_hint = bio->bi_write_hint;
 	blk_rq_bio_prep(req->q, req, bio);
 }
@@ -1494,6 +1493,7 @@  void blk_rq_bio_prep(struct request_queue *q, struct request *rq,
 
 	rq->__data_len = bio->bi_iter.bi_size;
 	rq->bio = rq->biotail = bio;
+	rq->ioprio = bio_prio(bio);
 
 	if (bio->bi_disk)
 		rq->rq_disk = bio->bi_disk;