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>
This commit is contained in:
Christoph Hellwig
2017-06-03 09:38:05 +02:00
committed by Jens Axboe
parent 2a842acab1
commit fc17b6534e
18 changed files with 133 additions and 144 deletions

View File

@@ -316,7 +316,7 @@ static void ubiblock_do_work(struct work_struct *work)
blk_mq_end_request(req, errno_to_blk_status(ret));
}
static int ubiblock_queue_rq(struct blk_mq_hw_ctx *hctx,
static blk_status_t ubiblock_queue_rq(struct blk_mq_hw_ctx *hctx,
const struct blk_mq_queue_data *bd)
{
struct request *req = bd->rq;
@@ -327,9 +327,9 @@ static int ubiblock_queue_rq(struct blk_mq_hw_ctx *hctx,
case REQ_OP_READ:
ubi_sgl_init(&pdu->usgl);
queue_work(dev->wq, &pdu->work);
return BLK_MQ_RQ_QUEUE_OK;
return BLK_STS_OK;
default:
return BLK_MQ_RQ_QUEUE_ERROR;
return BLK_STS_IOERR;
}
}