On 04/04/2016 03:00 AM, Hannes Reinecke wrote:
@@ -2460,9 +2460,13 @@ struct request *blk_peek_request(struct request_queue *q)
rq = NULL;
break;
- } else if (ret == BLKPREP_KILL || ret == BLKPREP_INVALID) {
+ } else if (ret == BLKPREP_KILL || ret == BLKPREP_INVALID ||
+ ret == BLKPREP_DONE) {
int err = (ret == BLKPREP_INVALID) ? -EREMOTEIO : -EIO;
+ if (ret == BLKPREP_DONE)
+ err = 0;
+
rq->cmd_flags |= REQ_QUIET;
/*
* Mark this request as started so we don't trigger
Hello Hannes,
How about using a switch/case statement to translate BLKPREP_* into an
error code?
Bart.
--
To unsubscribe from this list: send the line "unsubscribe linux-block" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html