]> www.infradead.org Git - users/jedix/linux-maple.git/commit
s390/dasd: fix error recovery leading to data corruption on ESE devices
authorStefan Haberland <sth@linux.ibm.com>
Mon, 12 Aug 2024 12:57:33 +0000 (14:57 +0200)
committerJens Axboe <axboe@kernel.dk>
Mon, 12 Aug 2024 16:31:08 +0000 (10:31 -0600)
commit7db4042336580dfd75cb5faa82c12cd51098c90b
tree32f16d1353bb9a7414aa47e673fe7005c6937fd0
parent2a07bb64d80152701d507b1498237ed1b8d83866
s390/dasd: fix error recovery leading to data corruption on ESE devices

Extent Space Efficient (ESE) or thin provisioned volumes need to be
formatted on demand during usual IO processing.

The dasd_ese_needs_format function checks for error codes that signal
the non existence of a proper track format.

The check for incorrect length is to imprecise since other error cases
leading to transport of insufficient data also have this flag set.
This might lead to data corruption in certain error cases for example
during a storage server warmstart.

Fix by removing the check for incorrect length and replacing by
explicitly checking for invalid track format in transport mode.

Also remove the check for file protected since this is not a valid
ESE handling case.

Cc: stable@vger.kernel.org # 5.3+
Fixes: 5e2b17e712cf ("s390/dasd: Add dynamic formatting support for ESE volumes")
Reviewed-by: Jan Hoeppner <hoeppner@linux.ibm.com>
Signed-off-by: Stefan Haberland <sth@linux.ibm.com>
Link: https://lore.kernel.org/r/20240812125733.126431-3-sth@linux.ibm.com
Signed-off-by: Jens Axboe <axboe@kernel.dk>
drivers/s390/block/dasd.c
drivers/s390/block/dasd_3990_erp.c
drivers/s390/block/dasd_eckd.c
drivers/s390/block/dasd_int.h