Skip to content

Commit 658a337

Browse files
Stefan Haberlandaxboe
Stefan Haberland
authored andcommitted
s390/dasd: fix hanging device offline processing
For an LCU update a read unit address configuration IO is required. This is started using sleep_on(), which has early exit paths in case the device is not usable for IO. For example when it is in offline processing. In those cases the LCU update should fail and not be retried. Therefore lcu_update_work checks if EOPNOTSUPP is returned or not. Commit 4199534 ("s390/dasd: fix endless loop after read unit address configuration") accidentally removed the EOPNOTSUPP return code from read_unit_address_configuration(), which in turn might lead to an endless loop of the LCU update in offline processing. Fix by returning EOPNOTSUPP again if the device is not able to perform the request. Fixes: 4199534 ("s390/dasd: fix endless loop after read unit address configuration") Cc: [email protected] #5.3 Signed-off-by: Stefan Haberland <[email protected]> Reviewed-by: Jan Hoeppner <[email protected]> Signed-off-by: Jens Axboe <[email protected]>
1 parent 76efc1c commit 658a337

File tree

1 file changed

+9
-1
lines changed

1 file changed

+9
-1
lines changed

drivers/s390/block/dasd_alias.c

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -462,11 +462,19 @@ static int read_unit_address_configuration(struct dasd_device *device,
462462
spin_unlock_irqrestore(&lcu->lock, flags);
463463

464464
rc = dasd_sleep_on(cqr);
465-
if (rc && !suborder_not_supported(cqr)) {
465+
if (!rc)
466+
goto out;
467+
468+
if (suborder_not_supported(cqr)) {
469+
/* suborder not supported or device unusable for IO */
470+
rc = -EOPNOTSUPP;
471+
} else {
472+
/* IO failed but should be retried */
466473
spin_lock_irqsave(&lcu->lock, flags);
467474
lcu->flags |= NEED_UAC_UPDATE;
468475
spin_unlock_irqrestore(&lcu->lock, flags);
469476
}
477+
out:
470478
dasd_sfree_request(cqr, cqr->memdev);
471479
return rc;
472480
}

0 commit comments

Comments
 (0)