aboutsummaryrefslogtreecommitdiffstats
path: root/block/blk-core.c
diff options
context:
space:
mode:
Diffstat (limited to 'block/blk-core.c')
-rw-r--r--block/blk-core.c23
1 files changed, 20 insertions, 3 deletions
diff --git a/block/blk-core.c b/block/blk-core.c
index 2f4002f79a24..b3cf121f1de9 100644
--- a/block/blk-core.c
+++ b/block/blk-core.c
@@ -2044,9 +2044,26 @@ bool blk_update_request(struct request *req, int error, unsigned int nr_bytes)
2044 2044
2045 if (error && req->cmd_type == REQ_TYPE_FS && 2045 if (error && req->cmd_type == REQ_TYPE_FS &&
2046 !(req->cmd_flags & REQ_QUIET)) { 2046 !(req->cmd_flags & REQ_QUIET)) {
2047 printk(KERN_ERR "end_request: I/O error, dev %s, sector %llu\n", 2047 char *error_type;
2048 req->rq_disk ? req->rq_disk->disk_name : "?", 2048
2049 (unsigned long long)blk_rq_pos(req)); 2049 switch (error) {
2050 case -ENOLINK:
2051 error_type = "recoverable transport";
2052 break;
2053 case -EREMOTEIO:
2054 error_type = "critical target";
2055 break;
2056 case -EBADE:
2057 error_type = "critical nexus";
2058 break;
2059 case -EIO:
2060 default:
2061 error_type = "I/O";
2062 break;
2063 }
2064 printk(KERN_ERR "end_request: %s error, dev %s, sector %llu\n",
2065 error_type, req->rq_disk ? req->rq_disk->disk_name : "?",
2066 (unsigned long long)blk_rq_pos(req));
2050 } 2067 }
2051 2068
2052 blk_account_io_completion(req, nr_bytes); 2069 blk_account_io_completion(req, nr_bytes);