diff options
author | Stefan Haberland <sth@linux.vnet.ibm.com> | 2017-05-18 07:24:45 -0400 |
---|---|---|
committer | Martin Schwidefsky <schwidefsky@de.ibm.com> | 2017-06-12 10:26:01 -0400 |
commit | e8ac01555d9e464249e8bb122337d6d6e5589ccc (patch) | |
tree | f567b83e800bbc3fa2d0417a49b3c5f5621bb2df | |
parent | 2757fe1d8ebd0e6ab1dbf1105978b8c8369dcc49 (diff) |
s390/dasd: fix hanging safe offline
The safe offline processing may hang forever because it waits for I/O
which can not be started because of the offline flag that prevents new
I/O from being started.
Allow I/O to be started during safe offline processing because in this
special case we take care that the queues are empty before throwing away
the device.
Signed-off-by: Stefan Haberland <sth@linux.vnet.ibm.com>
Signed-off-by: Martin Schwidefsky <schwidefsky@de.ibm.com>
-rw-r--r-- | drivers/s390/block/dasd.c | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/drivers/s390/block/dasd.c b/drivers/s390/block/dasd.c index b0c65dcb6865..c72ac57940f4 100644 --- a/drivers/s390/block/dasd.c +++ b/drivers/s390/block/dasd.c | |||
@@ -1965,8 +1965,12 @@ static int __dasd_device_is_unusable(struct dasd_device *device, | |||
1965 | { | 1965 | { |
1966 | int mask = ~(DASD_STOPPED_DC_WAIT | DASD_UNRESUMED_PM); | 1966 | int mask = ~(DASD_STOPPED_DC_WAIT | DASD_UNRESUMED_PM); |
1967 | 1967 | ||
1968 | if (test_bit(DASD_FLAG_OFFLINE, &device->flags)) { | 1968 | if (test_bit(DASD_FLAG_OFFLINE, &device->flags) && |
1969 | /* dasd is being set offline. */ | 1969 | !test_bit(DASD_FLAG_SAFE_OFFLINE_RUNNING, &device->flags)) { |
1970 | /* | ||
1971 | * dasd is being set offline | ||
1972 | * but it is no safe offline where we have to allow I/O | ||
1973 | */ | ||
1970 | return 1; | 1974 | return 1; |
1971 | } | 1975 | } |
1972 | if (device->stopped) { | 1976 | if (device->stopped) { |