summaryrefslogtreecommitdiff
path: root/rust/kernel/alloc
diff options
context:
space:
mode:
authorLi RongQing <lirongqing@baidu.com>2026-10-11 01:35:55 -0500
committerJens Axboe <axboe@kernel.dk>2026-10-15 18:25:35 -0600
commit80897c7e5ae5c56f37a2eb004328edcb4da7cdd1 (patch)
treed82c08d5e15b140005ff5f23c9c86ca296ae1f94 /rust/kernel/alloc
parentbcab0b98566b8f73f8e398d4f12a088b81885459 (diff)
ublk: use global index for reported zones
ublk_report_zones() may split a zone report into multiple requests when the number of zones exceeds the temporary buffer capacity. The index passed to disk_report_zone() must refer to the zone position in the whole report, rather than the position within the current request. Currently, the per-request loop index is used as the callback index, causing each chunk after the first one to restart from zero. This can make userspace callbacks receive duplicate zone indices and may result in blk_revalidate_disk_zones() updating incorrect entries in its zone state array. Use the number of zones already reported as the base index for each request so that zone indices remain continuous across all chunks. Fixes: 29802d7ca33b ("ublk: enable zoned storage support") Signed-off-by: Li RongQing <lirongqing@baidu.com> Reviewed-by: Ming Lei <tom.leiming@gmail.com> Tested-by: Ming Lei <tom.leiming@gmail.com> Signed-off-by: Ming Lei <tom.leiming@gmail.com> Link: https://patch.msgid.link/20261011063555.1142277-13-tom.leiming@gmail.com Signed-off-by: Jens Axboe <axboe@kernel.dk>
Diffstat (limited to 'rust/kernel/alloc')
0 files changed, 0 insertions, 0 deletions