[SCSI] Return ENODATA on medium error

When a medium error is detected the SCSI stack should return
ENODATA to the upper layers.

[jejb: fix whitespace error]
Signed-off-by: Hannes Reinecke <[email protected]>
Signed-off-by: James Bottomley <[email protected]>
This commit is contained in:
Hannes Reinecke 2013-07-01 15:16:26 +02:00 • committed by James Bottomley
commit 7e782af576
5 changed files with 25 additions and 2 deletions

View file

@ -2321,6 +2321,9 @@ bool blk_update_request(struct request *req, int error, unsigned int nr_bytes)
case -ENOSPC:
error_type = "critical space allocation";
break;
case -ENODATA:
error_type = "critical medium";
break;
case -EIO:
default:
error_type = "I/O";