diff options
author | Stefan Haberland <sth@linux.vnet.ibm.com> | 2016-09-20 10:29:22 +0200 |
---|---|---|
committer | Martin Schwidefsky <schwidefsky@de.ibm.com> | 2016-09-26 16:45:27 +0200 |
commit | a9f6273ff9c80dd2c226f7a2d5c16272e5092d3e (patch) | |
tree | f73e1066b4e23e63857db65a49943230f52be719 /drivers/s390/block/dasd.c | |
parent | s390/pci_dma: improve lazy flush for unmap (diff) | |
download | linux-a9f6273ff9c80dd2c226f7a2d5c16272e5092d3e.tar.xz linux-a9f6273ff9c80dd2c226f7a2d5c16272e5092d3e.zip |
s390/dasd: fix hanging offline processing
Internal I/O is processed by the _sleep_on_function which might wait for a
device to get operational. During offline processing this will never happen
and therefore the refcount of the device will not drop to zero and the
offline processing blocks as well.
Fix by letting requests fail in the _sleep_on function during offline
processing. No further handling of the requests is necessary since this is
internal I/O and the device is thrown away afterwards.
Reviewed-by: Peter Oberparleiter <oberpar@linux.vnet.ibm.com>
Signed-off-by: Stefan Haberland <sth@linux.vnet.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 | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/drivers/s390/block/dasd.c b/drivers/s390/block/dasd.c index 5245d7e37a46..706ae0ac94c9 100644 --- a/drivers/s390/block/dasd.c +++ b/drivers/s390/block/dasd.c @@ -2278,6 +2278,15 @@ static int _dasd_sleep_on(struct dasd_ccw_req *maincqr, int interruptible) continue; } /* + * Don't try to start requests if device is in + * offline processing, it might wait forever + */ + if (test_bit(DASD_FLAG_OFFLINE, &device->flags)) { + cqr->status = DASD_CQR_FAILED; + cqr->intrc = -ENODEV; + continue; + } + /* * Don't try to start requests if device is stopped * except path verification requests */ |