Commit 04fbaf10 authored by Stefan Haberland's avatar Stefan Haberland Committed by Stefan Bader

s390/dasd: fix hanging safe offline

BugLink: http://bugs.launchpad.net/bugs/1765010

[ Upstream commit e8ac0155 ]

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: default avatarStefan Haberland <sth@linux.vnet.ibm.com>
Signed-off-by: default avatarMartin Schwidefsky <schwidefsky@de.ibm.com>
Signed-off-by: default avatarSasha Levin <alexander.levin@microsoft.com>
Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Signed-off-by: default avatarJuerg Haefliger <juergh@canonical.com>
Signed-off-by: default avatarStefan Bader <stefan.bader@canonical.com>
parent 423dda04
...@@ -1881,8 +1881,12 @@ static int __dasd_device_is_unusable(struct dasd_device *device, ...@@ -1881,8 +1881,12 @@ static int __dasd_device_is_unusable(struct dasd_device *device,
{ {
int mask = ~(DASD_STOPPED_DC_WAIT | DASD_UNRESUMED_PM); int mask = ~(DASD_STOPPED_DC_WAIT | DASD_UNRESUMED_PM);
if (test_bit(DASD_FLAG_OFFLINE, &device->flags)) { if (test_bit(DASD_FLAG_OFFLINE, &device->flags) &&
/* dasd is being set offline. */ !test_bit(DASD_FLAG_SAFE_OFFLINE_RUNNING, &device->flags)) {
/*
* dasd is being set offline
* but it is no safe offline where we have to allow I/O
*/
return 1; return 1;
} }
if (device->stopped) { if (device->stopped) {
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment