]> git.ipfire.org Git - thirdparty/kernel/stable.git/commit
s390/dasd: fix hanging device after request requeue
authorStefan Haberland <sth@linux.ibm.com>
Fri, 21 Jul 2023 19:36:46 +0000 (21:36 +0200)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Tue, 19 Sep 2023 10:22:27 +0000 (12:22 +0200)
commitf85908f6bfd23f403b196df2967c1bb9b42f7ae1
tree43cb7c53a098a9da6f50af8544131d7a85ac8f5c
parenta4845e6948937508a31335c721c19d0e0c296eff
s390/dasd: fix hanging device after request requeue

[ Upstream commit 8a2278ce9c25048d999fe1a3561def75d963f471 ]

The DASD device driver has a function to requeue requests to the
blocklayer.
This function is used in various cases when basic settings for the device
have to be changed like High Performance Ficon related parameters or copy
pair settings.

The functions iterates over the device->ccw_queue and also removes the
requests from the block->ccw_queue.
In case the device is started on an alias device instead of the base
device it might be removed from the block->ccw_queue without having it
canceled properly before. This might lead to a hanging device since the
request is no longer on a queue and can not be handled properly.

Fix by iterating over the block->ccw_queue instead of the
device->ccw_queue. This will take care of all blocklayer related requests
and handle them on all associated DASD devices.

Signed-off-by: Stefan Haberland <sth@linux.ibm.com>
Reviewed-by: Jan Hoeppner <hoeppner@linux.ibm.com>
Link: https://lore.kernel.org/r/20230721193647.3889634-4-sth@linux.ibm.com
Signed-off-by: Jens Axboe <axboe@kernel.dk>
Signed-off-by: Sasha Levin <sashal@kernel.org>
drivers/s390/block/dasd.c