summaryrefslogtreecommitdiff
path: root/rust/helpers/helpers.c
diff options
context:
space:
mode:
authorJohn Garry <john.g.garry@oracle.com>2025-09-15 10:34:59 +0000
committerJens Axboe <axboe@kernel.dk>2025-09-16 12:29:10 -0600
commitf2d8c5a2f79c28569edf4948b611052253b5e99a (patch)
treec0597fb0f783f4af66c5f97c87d67f643a0dac74 /rust/helpers/helpers.c
parentbfd4037296bd7e1f95394a2e3daf8e3c1796c3b3 (diff)
block: fix stacking of atomic writes when atomics are not supported
Atomic writes support may not always be possible when stacking devices which support atomic writes. Such as case is a different atomic write boundary between stacked devices (which is not supported). In the case that atomic writes cannot supported, the top device queue HW limits are set to 0. However, in blk_stack_atomic_writes_limits(), we detect that we are stacking the first bottom device by checking the top device atomic_write_hw_max value == 0. This get confused with the case of atomic writes not supported, above. Make the distinction between stacking the first bottom device and no atomics supported by initializing stacked device atomic_write_hw_max = UINT_MAX and checking that for stacking the first bottom device. Fixes: d7f36dc446e8 ("block: Support atomic writes limits for stacked devices") Signed-off-by: John Garry <john.g.garry@oracle.com> Reviewed-by: Martin K. Petersen <martin.petersen@oracle.com> Signed-off-by: Jens Axboe <axboe@kernel.dk>
Diffstat (limited to 'rust/helpers/helpers.c')
0 files changed, 0 insertions, 0 deletions