diff options
author | Stefan Haberland <stefan.haberland@de.ibm.com> | 2014-07-18 14:26:01 +0200 |
---|---|---|
committer | Martin Schwidefsky <schwidefsky@de.ibm.com> | 2014-07-22 09:26:23 +0200 |
commit | 29b8dd9d4274bca6526e4bb8d4f46dec1f4c15c9 (patch) | |
tree | 631cb92a24223b571ea534f28ea7ec0a2950480b /drivers/s390/block/dasd.c | |
parent | 8fa56aed12f1b0a2828da52280e2efbbf1163ad5 (diff) | |
download | linux-29b8dd9d4274bca6526e4bb8d4f46dec1f4c15c9.tar.gz linux-29b8dd9d4274bca6526e4bb8d4f46dec1f4c15c9.tar.bz2 linux-29b8dd9d4274bca6526e4bb8d4f46dec1f4c15c9.zip |
dasd: fix error recovery for alias devices during format
Kernel panic or a hanging device during format if an alias device is
set offline or I/O errors occur.
Omit the error recovery procedure for alias devices and do retries on
the base device with full erp.
Signed-off-by: Stefan Haberland <stefan.haberland@de.ibm.com>
Signed-off-by: Martin Schwidefsky <schwidefsky@de.ibm.com>
Diffstat (limited to 'drivers/s390/block/dasd.c')
-rw-r--r-- | drivers/s390/block/dasd.c | 22 |
1 files changed, 16 insertions, 6 deletions
diff --git a/drivers/s390/block/dasd.c b/drivers/s390/block/dasd.c index 925b056dc2b3..5df05f26b7d9 100644 --- a/drivers/s390/block/dasd.c +++ b/drivers/s390/block/dasd.c @@ -2307,17 +2307,27 @@ retry: rc = 0; list_for_each_entry_safe(cqr, n, ccw_queue, blocklist) { - if (__dasd_sleep_on_erp(cqr)) { - if (!cqr->status == DASD_CQR_TERMINATED && - !cqr->status == DASD_CQR_NEED_ERP) - break; - rc = 1; + /* + * for alias devices simplify error recovery and + * return to upper layer + */ + if (cqr->startdev != cqr->basedev && + (cqr->status == DASD_CQR_TERMINATED || + cqr->status == DASD_CQR_NEED_ERP)) + return -EAGAIN; + else { + /* normal recovery for basedev IO */ + if (__dasd_sleep_on_erp(cqr)) { + if (!cqr->status == DASD_CQR_TERMINATED && + !cqr->status == DASD_CQR_NEED_ERP) + break; + rc = 1; + } } } if (rc) goto retry; - return 0; } |