diff options
author | Christoph Hellwig <hch@lst.de> | 2017-06-03 09:38:05 +0200 |
---|---|---|
committer | Jens Axboe <axboe@fb.com> | 2017-06-09 17:27:32 +0200 |
commit | fc17b6534eb8395f0b3133eb31d87deec32c642b (patch) | |
tree | 18686a2326ebd60d68f144c70f83f4441c6b4e2f /drivers/block/loop.c | |
parent | block: introduce new block status code type (diff) | |
download | linux-fc17b6534eb8395f0b3133eb31d87deec32c642b.tar.xz linux-fc17b6534eb8395f0b3133eb31d87deec32c642b.zip |
blk-mq: switch ->queue_rq return value to blk_status_t
Use the same values for use for request completion errors as the return
value from ->queue_rq. BLK_STS_RESOURCE is special cased to cause
a requeue, and all the others are completed as-is.
Signed-off-by: Christoph Hellwig <hch@lst.de>
Signed-off-by: Jens Axboe <axboe@fb.com>
Diffstat (limited to 'drivers/block/loop.c')
-rw-r--r-- | drivers/block/loop.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/drivers/block/loop.c b/drivers/block/loop.c index 4caf6338c012..70fd7e0de0fa 100644 --- a/drivers/block/loop.c +++ b/drivers/block/loop.c @@ -1674,7 +1674,7 @@ int loop_unregister_transfer(int number) EXPORT_SYMBOL(loop_register_transfer); EXPORT_SYMBOL(loop_unregister_transfer); -static int loop_queue_rq(struct blk_mq_hw_ctx *hctx, +static blk_status_t loop_queue_rq(struct blk_mq_hw_ctx *hctx, const struct blk_mq_queue_data *bd) { struct loop_cmd *cmd = blk_mq_rq_to_pdu(bd->rq); @@ -1683,7 +1683,7 @@ static int loop_queue_rq(struct blk_mq_hw_ctx *hctx, blk_mq_start_request(bd->rq); if (lo->lo_state != Lo_bound) - return BLK_MQ_RQ_QUEUE_ERROR; + return BLK_STS_IOERR; switch (req_op(cmd->rq)) { case REQ_OP_FLUSH: @@ -1698,7 +1698,7 @@ static int loop_queue_rq(struct blk_mq_hw_ctx *hctx, kthread_queue_work(&lo->worker, &cmd->work); - return BLK_MQ_RQ_QUEUE_OK; + return BLK_STS_OK; } static void loop_handle_cmd(struct loop_cmd *cmd) |