Skip to content

Commit 5e40b2e

Browse files
committed
md/raid0: Atomic write support
JIRA: https://issues.redhat.com/browse/RHEL-73514 commit fa6fec8 Author: John Garry <john.g.garry@oracle.com> Date: Mon Nov 18 10:50:16 2024 +0000 md/raid0: Atomic write support Set BLK_FEAT_ATOMIC_WRITES_STACKED to enable atomic writes. All other stacked device request queue limits should automatically be set properly. With regards to atomic write max bytes limit, this will be set at hw_max_sectors and this is limited by the stripe width, which we want. Reviewed-by: Yu Kuai <yukuai3@huawei.com> Signed-off-by: John Garry <john.g.garry@oracle.com> Reviewed-by: Martin K. Petersen <martin.petersen@oracle.com> Link: https://lore.kernel.org/r/20241118105018.1870052-4-john.g.garry@oracle.com Signed-off-by: Jens Axboe <axboe@kernel.dk> Signed-off-by: Nigel Croxon <ncroxon@redhat.com>
1 parent 3dca00a commit 5e40b2e

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

drivers/md/raid0.c

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -389,6 +389,7 @@ static int raid0_set_limits(struct mddev *mddev)
389389
lim.max_write_zeroes_sectors = mddev->chunk_sectors;
390390
lim.io_min = mddev->chunk_sectors << 9;
391391
lim.io_opt = lim.io_min * mddev->raid_disks;
392+
lim.features |= BLK_FEAT_ATOMIC_WRITES_STACKED;
392393
err = mddev_stack_rdev_limits(mddev, &lim, MDDEV_STACK_INTEGRITY);
393394
if (err) {
394395
queue_limits_cancel_update(mddev->gendisk->queue);

0 commit comments

Comments
 (0)