From 7e782af57649f8a8e943d80104c946a5cd7af7cc Mon Sep 17 00:00:00 2001 From: Hannes Reinecke Date: Mon, 1 Jul 2013 15:16:26 +0200 Subject: [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 Signed-off-by: James Bottomley --- block/blk-core.c | 3 +++ 1 file changed, 3 insertions(+) (limited to 'block') diff --git a/block/blk-core.c b/block/blk-core.c index 68ce4d53a528..c04505358342 100644 --- a/block/blk-core.c +++ b/block/blk-core.c @@ -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"; -- cgit v1.2.3