blk-mq: call blk_mq_start_request from ->queue_rq
authorChristoph Hellwig <hch@lst.de>
Sat, 13 Sep 2014 23:40:09 +0000 (16:40 -0700)
committerJens Axboe <axboe@fb.com>
Mon, 22 Sep 2014 18:00:07 +0000 (12:00 -0600)
commite2490073cd7c3d6f6ef6e029a208edd4d38efac4
tree48465e67b335f6d696d698641365b4a4d1e89d32
parentbf57229745f849e500ba69ff91e35bc8160a7373
blk-mq: call blk_mq_start_request from ->queue_rq

When we call blk_mq_start_request from the core blk-mq code before calling into
->queue_rq there is a racy window where the timeout handler can hit before we've
fully set up the driver specific part of the command.

Move the call to blk_mq_start_request into the driver so the driver can start
the request only once it is fully set up.

Signed-off-by: Christoph Hellwig <hch@lst.de>
Signed-off-by: Jens Axboe <axboe@fb.com>
block/blk-mq.c
drivers/block/mtip32xx/mtip32xx.c
drivers/block/null_blk.c
drivers/block/virtio_blk.c
drivers/scsi/scsi_lib.c
include/linux/blk-mq.h