diff options
author | Christoph Hellwig <hch@lst.de> | 2017-01-27 03:46:29 -0500 |
---|---|---|
committer | Jens Axboe <axboe@fb.com> | 2017-01-27 17:08:35 -0500 |
commit | 82ed4db499b8598f16f8871261bff088d6b0597f (patch) | |
tree | e1cc0a433bf5ae2b9723837291617bdfeeb61816 /block/blk-mq.c | |
parent | 8ae94eb65be9425af4d57a4f4cfebfdf03081e93 (diff) |
block: split scsi_request out of struct request
And require all drivers that want to support BLOCK_PC to allocate it
as the first thing of their private data. To support this the legacy
IDE and BSG code is switched to set cmd_size on their queues to let
the block layer allocate the additional space.
Signed-off-by: Christoph Hellwig <hch@lst.de>
Signed-off-by: Jens Axboe <axboe@fb.com>
Diffstat (limited to 'block/blk-mq.c')
-rw-r--r-- | block/blk-mq.c | 10 |
1 files changed, 0 insertions, 10 deletions
diff --git a/block/blk-mq.c b/block/blk-mq.c index 60dac10228fe..3d76e860f126 100644 --- a/block/blk-mq.c +++ b/block/blk-mq.c | |||
@@ -199,13 +199,7 @@ void blk_mq_rq_ctx_init(struct request_queue *q, struct blk_mq_ctx *ctx, | |||
199 | rq->special = NULL; | 199 | rq->special = NULL; |
200 | /* tag was already set */ | 200 | /* tag was already set */ |
201 | rq->errors = 0; | 201 | rq->errors = 0; |
202 | |||
203 | rq->cmd = rq->__cmd; | ||
204 | |||
205 | rq->extra_len = 0; | 202 | rq->extra_len = 0; |
206 | rq->sense_len = 0; | ||
207 | rq->resid_len = 0; | ||
208 | rq->sense = NULL; | ||
209 | 203 | ||
210 | INIT_LIST_HEAD(&rq->timeout_list); | 204 | INIT_LIST_HEAD(&rq->timeout_list); |
211 | rq->timeout = 0; | 205 | rq->timeout = 0; |
@@ -487,10 +481,6 @@ void blk_mq_start_request(struct request *rq) | |||
487 | 481 | ||
488 | trace_block_rq_issue(q, rq); | 482 | trace_block_rq_issue(q, rq); |
489 | 483 | ||
490 | rq->resid_len = blk_rq_bytes(rq); | ||
491 | if (unlikely(blk_bidi_rq(rq))) | ||
492 | rq->next_rq->resid_len = blk_rq_bytes(rq->next_rq); | ||
493 | |||
494 | if (test_bit(QUEUE_FLAG_STATS, &q->queue_flags)) { | 484 | if (test_bit(QUEUE_FLAG_STATS, &q->queue_flags)) { |
495 | blk_stat_set_issue_time(&rq->issue_stat); | 485 | blk_stat_set_issue_time(&rq->issue_stat); |
496 | rq->rq_flags |= RQF_STATS; | 486 | rq->rq_flags |= RQF_STATS; |