]> git.itanic.dy.fi Git - linux-stable/commit
s390/dasd: fix command reject error on ESE devices
authorStefan Haberland <sth@linux.ibm.com>
Fri, 19 May 2023 10:23:40 +0000 (12:23 +0200)
committerJens Axboe <axboe@kernel.dk>
Sat, 20 May 2023 02:03:59 +0000 (20:03 -0600)
commitc99bff34290f1b994073557b754aff86e4c7b22e
treeb78f5e40708cd6b6082fcc79fa4dfadf332342a5
parent1878b736e88e0d30f67d7fb577816395727ef040
s390/dasd: fix command reject error on ESE devices

Formatting a thin-provisioned (ESE) device that is part of a PPRC copy
relation might fail with the following error:

dasd-eckd 0.0.f500: An error occurred in the DASD device driver, reason=09
[...]
24 Byte: 0 MSG 4, no MSGb to SYSOP

During format of an ESE disk the Release Allocated Space command is used.
A bit in the payload of the command is set that is not allowed to be set
for devices in a copy relation. This bit is set to allow the partial
release of an extent.

Check for the existence of a copy relation before setting the respective
bit.

Fixes: 91dc4a197569 ("s390/dasd: Add new ioctl to release space")
Cc: stable@kernel.org # 5.3+
Signed-off-by: Stefan Haberland <sth@linux.ibm.com>
Reviewed-by: Jan Hoeppner <hoeppner@linux.ibm.com>
Link: https://lore.kernel.org/r/20230519102340.3854819-2-sth@linux.ibm.com
Signed-off-by: Jens Axboe <axboe@kernel.dk>
drivers/s390/block/dasd_eckd.c