]> git.ipfire.org Git - thirdparty/kernel/linux.git/commit
s390/dasd: Copy detected format information to secondary device
authorStefan Haberland <sth@linux.ibm.com>
Tue, 10 Mar 2026 14:23:30 +0000 (15:23 +0100)
committerJens Axboe <axboe@kernel.dk>
Tue, 10 Mar 2026 14:58:38 +0000 (08:58 -0600)
commit4c527c7e030672efd788d0806d7a68972a7ba3c1
tree860099f97cd591c539603402d9d9e26c5cf0f736
parent40e9cd4ae8ec43b107ed2bff422a8fa39dcf4e4b
s390/dasd: Copy detected format information to secondary device

During online processing for a DASD device an IO operation is started to
determine the format of the device. CDL format contains specifically
sized blocks at the beginning of the disk.

For a PPRC secondary device no real IO operation is possible therefore
this IO request can not be started and this step is skipped for online
processing of secondary devices. This is generally fine since the
secondary is a copy of the primary device.

In case of an additional partition detection that is run after a swap
operation the format information is needed to properly drive partition
detection IO.

Currently the information is not passed leading to IO errors during
partition detection and a wrongly detected partition table which in turn
might lead to data corruption on the disk with the wrong partition table.

Fix by passing the format information from primary to secondary device.

Fixes: 413862caad6f ("s390/dasd: add copy pair swap capability")
Cc: stable@vger.kernel.org #6.1
Reviewed-by: Jan Hoeppner <hoeppner@linux.ibm.com>
Acked-by: Eduard Shishkin <edward6@linux.ibm.com>
Signed-off-by: Stefan Haberland <sth@linux.ibm.com>
Link: https://patch.msgid.link/20260310142330.4080106-3-sth@linux.ibm.com
Signed-off-by: Jens Axboe <axboe@kernel.dk>
drivers/s390/block/dasd_eckd.c