diff options
author | Stefan Haberland <stefan.haberland@de.ibm.com> | 2014-11-24 04:53:19 -0500 |
---|---|---|
committer | Martin Schwidefsky <schwidefsky@de.ibm.com> | 2014-11-28 03:47:29 -0500 |
commit | 2c17124bf33f0d9450375610ff79ad83531b5bfe (patch) | |
tree | 5810104fc4c8b96a7d28b2541984e2c585358751 | |
parent | 590aeeddc6c6d9b9c93bec56fc68512631489d2a (diff) |
s390/dasd: fix infinite term I/O loop
During device activation all paths could be lost and since the device
is not active it has no indication of this fact - hence the CQR will
time-out. The following cancelation might fail with -EINVAL because
CIO took over control and started path verification. In this case mark
the CQR as being CLEARED since it could not be running any more.
Signed-off-by: Stefan Haberland <stefan.haberland@de.ibm.com>
Signed-off-by: Martin Schwidefsky <schwidefsky@de.ibm.com>
-rw-r--r-- | drivers/s390/block/dasd.c | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/drivers/s390/block/dasd.c b/drivers/s390/block/dasd.c index 3679aeca1c1a..8cb120e9c868 100644 --- a/drivers/s390/block/dasd.c +++ b/drivers/s390/block/dasd.c | |||
@@ -1377,6 +1377,20 @@ int dasd_term_IO(struct dasd_ccw_req *cqr) | |||
1377 | "I/O error, retry"); | 1377 | "I/O error, retry"); |
1378 | break; | 1378 | break; |
1379 | case -EINVAL: | 1379 | case -EINVAL: |
1380 | /* | ||
1381 | * device not valid so no I/O could be running | ||
1382 | * handle CQR as termination successful | ||
1383 | */ | ||
1384 | cqr->status = DASD_CQR_CLEARED; | ||
1385 | cqr->stopclk = get_tod_clock(); | ||
1386 | cqr->starttime = 0; | ||
1387 | /* no retries for invalid devices */ | ||
1388 | cqr->retries = -1; | ||
1389 | DBF_DEV_EVENT(DBF_ERR, device, "%s", | ||
1390 | "EINVAL, handle as terminated"); | ||
1391 | /* fake rc to success */ | ||
1392 | rc = 0; | ||
1393 | break; | ||
1380 | case -EBUSY: | 1394 | case -EBUSY: |
1381 | DBF_DEV_EVENT(DBF_ERR, device, "%s", | 1395 | DBF_DEV_EVENT(DBF_ERR, device, "%s", |
1382 | "device busy, retry later"); | 1396 | "device busy, retry later"); |