@@ -851,6 +851,7 @@ static void __blk_mq_run_hw_queue(struct blk_mq_hw_ctx *hctx)
pr_err("blk-mq: bad return on queue: %d\n", ret);
case BLK_MQ_RQ_QUEUE_ERROR:
rq->errors = -EIO;
+ case BLK_MQ_RQ_QUEUE_DONE:
blk_mq_end_request(rq, rq->errors);
break;
}
@@ -1805,6 +1805,8 @@ static inline int prep_to_mq(int ret)
return 0;
case BLKPREP_DEFER:
return BLK_MQ_RQ_QUEUE_BUSY;
+ case BLKPREP_DONE:
+ return BLK_MQ_RQ_QUEUE_DONE;
default:
return BLK_MQ_RQ_QUEUE_ERROR;
}
@@ -1948,6 +1950,7 @@ out:
blk_mq_delay_queue(hctx, SCSI_QUEUE_DELAY);
break;
case BLK_MQ_RQ_QUEUE_ERROR:
+ case BLK_MQ_RQ_QUEUE_DONE:
/*
* Make sure to release all allocated ressources when
* we hit an error, as we will never see this command
@@ -153,6 +153,7 @@ enum {
BLK_MQ_RQ_QUEUE_OK = 0, /* queued fine */
BLK_MQ_RQ_QUEUE_BUSY = 1, /* requeue IO for later */
BLK_MQ_RQ_QUEUE_ERROR = 2, /* end IO with error */
+ BLK_MQ_RQ_QUEUE_DONE = 3, /* end IO w/o error */
BLK_MQ_F_SHOULD_MERGE = 1 << 0,
BLK_MQ_F_TAG_SHARED = 1 << 1,