]> git.ipfire.org Git - thirdparty/kernel/linux.git/commitdiff
s390/dasd: Move quiesce state with pprc swap
authorStefan Haberland <sth@linux.ibm.com>
Tue, 10 Mar 2026 14:23:29 +0000 (15:23 +0100)
committerJens Axboe <axboe@kernel.dk>
Tue, 10 Mar 2026 14:58:38 +0000 (08:58 -0600)
Quiesce and resume is a mechanism to suspend operations on DASD devices.
In the context of a controlled copy pair swap operation, the quiesce
operation is usually issued before the actual swap and a resume
afterwards.

During the swap operation, the underlying device is exchanged. Therefore,
the quiesce flag must be moved to the secondary device to ensure a
consistent quiesce state after the swap.

The secondary device itself cannot be suspended separately because there
is no separate block device representation for it.

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

index b08e900687f3932d6663a93f9b2db50531f59bd4..e8f0e302a625baa2997699116bd9eed862c71078 100644 (file)
@@ -6182,6 +6182,11 @@ static int dasd_eckd_copy_pair_swap(struct dasd_device *device, char *prim_busid
                        dev_name(&secondary->cdev->dev), rc);
        }
 
+       if (primary->stopped & DASD_STOPPED_QUIESCE) {
+               dasd_device_set_stop_bits(secondary, DASD_STOPPED_QUIESCE);
+               dasd_device_remove_stop_bits(primary, DASD_STOPPED_QUIESCE);
+       }
+
        /* re-enable device */
        dasd_device_remove_stop_bits(primary, DASD_STOPPED_PPRC);
        dasd_device_remove_stop_bits(secondary, DASD_STOPPED_PPRC);