Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

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>

authored by

John Garry and committed by
Jens Axboe
fa6fec82 d7f36dc4

+1
+1
drivers/md/raid0.c
··· 384 384 lim.max_write_zeroes_sectors = mddev->chunk_sectors; 385 385 lim.io_min = mddev->chunk_sectors << 9; 386 386 lim.io_opt = lim.io_min * mddev->raid_disks; 387 + lim.features |= BLK_FEAT_ATOMIC_WRITES_STACKED; 387 388 err = mddev_stack_rdev_limits(mddev, &lim, MDDEV_STACK_INTEGRITY); 388 389 if (err) { 389 390 queue_limits_cancel_update(mddev->gendisk->queue);