Skip to content

Commit 5d1f7ee

Browse files
johnpgarryaxboe
authored andcommitted
block: Change blk_stack_atomic_writes_limits() unit_min check
The current check in blk_stack_atomic_writes_limits() for a bottom device supporting atomic writes is to verify that limit atomic_write_unit_min is non-zero. This would cause a problem for device mapper queue limits calculation. This is because it uses a temporary queue_limits structure to stack the limits, before finally commiting the limits update. The value of atomic_write_unit_min for the temporary queue_limits structure is never evaluated and so cannot be used, so use limit atomic_write_hw_unit_min. Reviewed-by: Christoph Hellwig <hch@lst.de> 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/20250109114000.2299896-3-john.g.garry@oracle.com Signed-off-by: Jens Axboe <axboe@kernel.dk>
1 parent 6564862 commit 5d1f7ee

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

block/blk-settings.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -614,7 +614,7 @@ static void blk_stack_atomic_writes_limits(struct queue_limits *t,
614614
if (!(t->features & BLK_FEAT_ATOMIC_WRITES_STACKED))
615615
goto unsupported;
616616

617-
if (!b->atomic_write_unit_min)
617+
if (!b->atomic_write_hw_unit_min)
618618
goto unsupported;
619619

620620
if (!blk_atomic_write_start_sect_aligned(start, b))

0 commit comments

Comments
 (0)