Re: [PATCH 7/9] block: Introduce BLKPREP_DONE

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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-scsi" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html



[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Index of Archives]     [SCSI Target Devel]     [Linux SCSI Target Infrastructure]     [Kernel Newbies]     [IDE]     [Security]     [Git]     [Netfilter]     [Bugtraq]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux ATA RAID]     [Linux IIO]     [Samba]     [Device Mapper]
  Powered by Linux