diff options
| author | John Garry <[email protected]> | 2025-01-16 17:02:54 +0000 |
|---|---|---|
| committer | Jens Axboe <[email protected]> | 2025-01-17 20:13:54 +0000 |
| commit | 6a7e17b22062c84a111d7073c67cc677c4190f32 (patch) | |
| tree | 026dc093971a5d76320eb40b9a8e456224756928 /drivers/md/raid1.c | |
| parent | Merge tag 'md-6.14-20250116' of https://git.kernel.org/pub/scm/linux/kernel/g... (diff) | |
| download | kernel-6a7e17b22062c84a111d7073c67cc677c4190f32.tar.gz kernel-6a7e17b22062c84a111d7073c67cc677c4190f32.zip | |
block: Add common atomic writes enable flag
Currently only stacked devices need to explicitly enable atomic writes by
setting BLK_FEAT_ATOMIC_WRITES_STACKED flag.
This does not work well for device mapper stacking devices, as there many
sets of limits are stacked and what is the 'bottom' and 'top' device can
swapped. This means that BLK_FEAT_ATOMIC_WRITES_STACKED needs to be set
for many queue limits, which is messy.
Generalize enabling atomic writes enabling by ensuring that all devices
must explicitly set a flag - that includes NVMe, SCSI sd, and md raid.
Signed-off-by: John Garry <[email protected]>
Reviewed-by: Mike Snitzer <[email protected]>
Link: https://lore.kernel.org/r/[email protected]
Signed-off-by: Jens Axboe <[email protected]>
Diffstat (limited to 'drivers/md/raid1.c')
| -rw-r--r-- | drivers/md/raid1.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/md/raid1.c b/drivers/md/raid1.c index a5cd6522fc2d..9d57a88dbd26 100644 --- a/drivers/md/raid1.c +++ b/drivers/md/raid1.c @@ -3217,7 +3217,7 @@ static int raid1_set_limits(struct mddev *mddev) md_init_stacking_limits(&lim); lim.max_write_zeroes_sectors = 0; - lim.features |= BLK_FEAT_ATOMIC_WRITES_STACKED; + lim.features |= BLK_FEAT_ATOMIC_WRITES; err = mddev_stack_rdev_limits(mddev, &lim, MDDEV_STACK_INTEGRITY); if (err) { queue_limits_cancel_update(mddev->gendisk->queue); |
