From: Song Liu Date: Thu, 3 Feb 2022 19:28:27 +0000 (-0800) Subject: scsi: use BLK_STS_OFFLINE for not fully online devices X-Git-Url: http://git.maquefel.me/?a=commitdiff_plain;h=9574d43479e16352e75bc875c9952ed8e129c9b2;p=linux.git scsi: use BLK_STS_OFFLINE for not fully online devices The new error message for such case looks like [ 172.809565] device offline error, dev sda, sector 3138208 ... which will not be confused with regular I/O error (BLK_STS_IOERR). Reviewed-by: Hannes Reinecke Signed-off-by: Song Liu Reviewed-by: Martin K. Petersen Link: https://lore.kernel.org/r/20220203192827.1370270-4-song@kernel.org Signed-off-by: Jens Axboe --- diff --git a/drivers/scsi/scsi_lib.c b/drivers/scsi/scsi_lib.c index 0a70aa763a961..e30bc51578e93 100644 --- a/drivers/scsi/scsi_lib.c +++ b/drivers/scsi/scsi_lib.c @@ -1276,7 +1276,7 @@ scsi_device_state_check(struct scsi_device *sdev, struct request *req) * power management commands. */ if (req && !(req->rq_flags & RQF_PM)) - return BLK_STS_IOERR; + return BLK_STS_OFFLINE; return BLK_STS_OK; } }