Skip to contentSkip to conversation

Patch "s390/dasd: fix hanging safe offline" has been added to the 4.4-stable tree

PATCH [email protected] 1 participant 1 message Apr 10, 2018

Subsystems (3)
lore
Share & tools
lore

[email protected]

author maintainer Applied
#0 lore raw

This is a note to let you know that I've just added the patch titled

s390/dasd: fix hanging safe offline

to the 4.4-stable tree which can be found at:
http://www.kernel.org/git/?p=linux/kernel/git/stable/stable-queue.git;a=summary

The filename of the patch is:
s390-dasd-fix-hanging-safe-offline.patch
and it can be found in the queue-4.4 subdirectory.

If you, or anyone else, feels it should not be added to the stable tree, please let <[email protected]> know about it.

Quoted 1 line

From foo@baz Tue Apr 10 10:31:53 CEST 2018

From: Stefan Haberland <[email protected]>
Date: Thu, 18 May 2017 13:24:45 +0200
Subject: s390/dasd: fix hanging safe offline

From: Stefan Haberland <[email protected]>

[ Upstream commit e8ac01555d9e464249e8bb122337d6d6e5589ccc ]

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.

---
 drivers/s390/block/dasd.c |    8 ++++++--
 1 file changed, 6 insertions(+), 2 deletions(-)
drivers/s390/block/dasd.c +6 -2
@@ -1881,8 +1881,12 @@ static int __dasd_device_is_unusable(str
 {
 	int mask = ~(DASD_STOPPED_DC_WAIT | DASD_UNRESUMED_PM);
 
-	if (test_bit(DASD_FLAG_OFFLINE, &device->flags)) {
-		/* dasd is being set offline. */
+	if (test_bit(DASD_FLAG_OFFLINE, &device->flags) &&
+	    !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;
 	}
 	if (device->stopped) {

Patches currently in stable-queue which might be from [email protected] are

queue-4.4/s390-dasd-fix-hanging-safe-offline.patch