aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--block/blk-core.c3
-rw-r--r--drivers/s390/block/dasd.c16
2 files changed, 16 insertions, 3 deletions
diff --git a/block/blk-core.c b/block/blk-core.c
index d5745b5833c9..321443226888 100644
--- a/block/blk-core.c
+++ b/block/blk-core.c
@@ -2315,6 +2315,9 @@ bool blk_update_request(struct request *req, int error, unsigned int nr_bytes)
2315 case -EBADE: 2315 case -EBADE:
2316 error_type = "critical nexus"; 2316 error_type = "critical nexus";
2317 break; 2317 break;
2318 case -ETIMEDOUT:
2319 error_type = "timeout";
2320 break;
2318 case -EIO: 2321 case -EIO:
2319 default: 2322 default:
2320 error_type = "I/O"; 2323 error_type = "I/O";
diff --git a/drivers/s390/block/dasd.c b/drivers/s390/block/dasd.c
index 87478becedb0..b97624bf183d 100644
--- a/drivers/s390/block/dasd.c
+++ b/drivers/s390/block/dasd.c
@@ -2183,7 +2183,7 @@ static int _dasd_sleep_on(struct dasd_ccw_req *maincqr, int interruptible)
2183 test_bit(DASD_CQR_FLAGS_FAILFAST, &cqr->flags) && 2183 test_bit(DASD_CQR_FLAGS_FAILFAST, &cqr->flags) &&
2184 (!dasd_eer_enabled(device))) { 2184 (!dasd_eer_enabled(device))) {
2185 cqr->status = DASD_CQR_FAILED; 2185 cqr->status = DASD_CQR_FAILED;
2186 cqr->intrc = -EAGAIN; 2186 cqr->intrc = -ENOLINK;
2187 continue; 2187 continue;
2188 } 2188 }
2189 /* Don't try to start requests if device is stopped */ 2189 /* Don't try to start requests if device is stopped */
@@ -2590,8 +2590,17 @@ static void __dasd_cleanup_cqr(struct dasd_ccw_req *cqr)
2590 req = (struct request *) cqr->callback_data; 2590 req = (struct request *) cqr->callback_data;
2591 dasd_profile_end(cqr->block, cqr, req); 2591 dasd_profile_end(cqr->block, cqr, req);
2592 status = cqr->block->base->discipline->free_cp(cqr, req); 2592 status = cqr->block->base->discipline->free_cp(cqr, req);
2593 if (status <= 0) 2593 if (status < 0)
2594 error = status ? status : -EIO; 2594 error = status;
2595 else if (status == 0) {
2596 if (cqr->intrc == -EPERM)
2597 error = -EBADE;
2598 else if (cqr->intrc == -ENOLINK ||
2599 cqr->intrc == -ETIMEDOUT)
2600 error = cqr->intrc;
2601 else
2602 error = -EIO;
2603 }
2595 __blk_end_request_all(req, error); 2604 __blk_end_request_all(req, error);
2596} 2605}
2597 2606
@@ -2692,6 +2701,7 @@ static void __dasd_block_start_head(struct dasd_block *block)
2692 test_bit(DASD_CQR_FLAGS_FAILFAST, &cqr->flags) && 2701 test_bit(DASD_CQR_FLAGS_FAILFAST, &cqr->flags) &&
2693 (!dasd_eer_enabled(block->base))) { 2702 (!dasd_eer_enabled(block->base))) {
2694 cqr->status = DASD_CQR_FAILED; 2703 cqr->status = DASD_CQR_FAILED;
2704 cqr->intrc = -ENOLINK;
2695 dasd_schedule_block_bh(block); 2705 dasd_schedule_block_bh(block);
2696 continue; 2706 continue;
2697 } 2707 }