From 40517c335f9bc25d3ea69bee783901cb36e3fe63 Mon Sep 17 00:00:00 2001 From: Vitaliy Filippov Date: Fri, 15 May 2026 00:26:13 +0300 Subject: [PATCH] Fix absolute bmp_end --- src/client/qemu_driver.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/client/qemu_driver.c b/src/client/qemu_driver.c index 5f4cd50d..5c9f4db3 100644 --- a/src/client/qemu_driver.c +++ b/src/client/qemu_driver.c @@ -1049,7 +1049,7 @@ static int coroutine_fn vitastor_co_block_status(BlockDriverState *bs, { // Get larger allocated extents, possibly with false positives uint64_t bmp_pos = (offset-task.offset) / task.bitmap_granularity; - uint64_t bmp_end = (offset+bytes-task.offset) / task.bitmap_granularity - bmp_pos; + uint64_t bmp_end = (offset+bytes-task.offset) / task.bitmap_granularity; while (bmp_pos < bmp_end) { if (!(bmp_pos & 7) && bmp_end >= bmp_pos+8)