Skip to content

Commit

Permalink
blk-mq: avoid re-initialize request which is failed in direct dispatch
Browse files Browse the repository at this point in the history
If we directly issue a request and it fails, we use
blk_mq_merge_queue_io(). But we already assigned bio to a request in
blk_mq_bio_to_request. blk_mq_merge_queue_io shouldn't run
blk_mq_bio_to_request again.

Signed-off-by: Shaohua Li <shli@fb.com>
Signed-off-by: Jens Axboe <axboe@fb.com>
  • Loading branch information
Shaohua Li authored and Jens Axboe committed May 8, 2015
1 parent e6c4438 commit 239ad21
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions block/blk-mq.c
Original file line number Diff line number Diff line change
Expand Up @@ -1284,6 +1284,8 @@ static void blk_mq_make_request(struct request_queue *q, struct bio *bio)
blk_mq_end_request(rq, rq->errors);
goto done;
}
blk_mq_insert_request(rq, false, true, true);
return;
}
}

Expand Down

0 comments on commit 239ad21

Please sign in to comment.