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 <hare@suse.de>
Signed-off-by: Song Liu <song@kernel.org>
Reviewed-by: Martin K. Petersen <martin.petersen@oracle.com>
Link: https://lore.kernel.org/r/20220203192827.1370270-4-song@kernel.org
Signed-off-by: Jens Axboe <axboe@kernel.dk>
This commit is contained in:
Song Liu 2022-02-03 11:28:27 -08:00 коммит произвёл Jens Axboe
Родитель 7d32c027a2
Коммит 9574d43479
1 изменённых файлов: 1 добавлений и 1 удалений

Просмотреть файл

@ -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;
}
}