blk-mq: move set RQF_RESV flag codes outside retry scope
RFC PATCH 1/1 blk-mq: move set RQF_RESV flag codes outside retry scope
From: Liu Song <[email protected]>
There is no need to set the RQF_RESV flag again on retry, so move that code to a more appropriate place.
Signed-off-by Liu Song <[email protected]>
--- block/blk-mq.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-)
block/blk-mq.c +3 -3
@@ -451,6 +451,9 @@ static struct request *__blk_mq_alloc_requests(struct blk_mq_alloc_data *data)if (data->cmd_flags &REQ_NOWAIT ) data->flags |=BLK_MQ_REQ_NOWAIT ; +if (data->flags &BLK_MQ_REQ_RESERVED ) + data->rq_flags |=RQF_RESV ; +if (q->elevator) {struct elevator_queue *e = q->elevator;
@@ -474,9 +477,6 @@ static struct request *__blk_mq_alloc_requests(struct blk_mq_alloc_data *data)if (!(data->rq_flags &RQF_ELV ))blk_mq_tag_busy (data->hctx); -if (data->flags &BLK_MQ_REQ_RESERVED ) - data->rq_flags |=RQF_RESV ; -/* * Try batched alloc if we want more than 1 tag. */
Signature · 1 line
1.8.3.1