linux/drivers/s390/block
Stefan Haberland f7eda67638 s390/dasd: Copy detected format information to secondary device
commit 4c527c7e03 upstream.

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: 413862caad ("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>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
History 2026-03-19 16:08:43 +01:00
..
dasd.c s390/dasd: enforce dma_alignment to ensure proper buffer validation 2025-09-25 10:34:30 -06:00
dasd_3990_erp.c s390/dasd: fix error recovery leading to data corruption on ESE devices 2024-08-12 10:31:08 -06:00
dasd_alias.c s390/dasd: use new address translation helpers 2024-03-13 09:23:46 +01:00
dasd_devmap.c s390/drivers: Explicitly include <linux/export.h> 2025-06-17 18:18:02 +02:00
dasd_diag.c s390: Use inline qualifier for all EX_TABLE and ALTERNATIVE inline assemblies 2025-03-18 17:13:51 +01:00
dasd_diag.h License cleanup: add SPDX GPL-2.0 license identifier to files with no license 2017-11-02 11:10:55 +01:00
dasd_eckd.c s390/dasd: Copy detected format information to secondary device 2026-03-19 16:08:43 +01:00
dasd_eckd.h s390/dasd: add device ping attribute 2022-09-21 08:32:51 -06:00
dasd_eer.c s390/drivers: Explicitly include <linux/export.h> 2025-06-17 18:18:02 +02:00
dasd_erp.c s390/drivers: Explicitly include <linux/export.h> 2025-06-17 18:18:02 +02:00
dasd_fba.c for-6.11/block-20240722 2024-07-22 11:32:05 -07:00
dasd_fba.h s390/dasd: fix typo in copyright statement 2019-12-20 11:52:01 -07:00
dasd_genhd.c block: remove BLK_MQ_F_SHOULD_MERGE 2024-12-23 08:17:23 -07:00
dasd_int.h s390/dasd: fix error recovery leading to data corruption on ESE devices 2024-08-12 10:31:08 -06:00
dasd_ioctl.c s390/drivers: Explicitly include <linux/export.h> 2025-06-17 18:18:02 +02:00
dasd_proc.c s390/dasd: fix redundant /proc/dasd* entries removal 2024-11-09 20:06:58 -07:00
dcssblk.c s390/dcssblk: Add DAX support 2025-09-16 16:56:39 +02:00
Kconfig s390/dcssblk: Add DAX support 2025-09-16 16:56:39 +02:00
Makefile s390: remove xpram device driver 2021-09-07 13:38:42 +02:00
scm_blk.c block: remove BLK_MQ_F_SHOULD_MERGE 2024-12-23 08:17:23 -07:00
scm_blk.h block: remove genhd.h 2022-02-02 07:49:59 -07:00
scm_drv.c s390/scm: Make struct scm_driver::remove return void 2021-07-21 11:53:42 +02:00