diff mbox series

[v4,07/21] parallels: Set data_end value in parallels_check_leak()

Message ID 20231228101232.372142-8-alexander.ivanov@virtuozzo.com (mailing list archive)
State New, archived
Headers show
Series parallels: Add full dirty bitmap support | expand

Commit Message

Alexander Ivanov Dec. 28, 2023, 10:12 a.m. UTC
In parallels_check_leak() we change file size but don't correct data_end
field of BDRVParallelsState structure. Fix it.

Signed-off-by: Alexander Ivanov <alexander.ivanov@virtuozzo.com>
---
 block/parallels.c | 1 +
 1 file changed, 1 insertion(+)

Comments

Denis V. Lunev Jan. 16, 2024, 2:21 p.m. UTC | #1
On 12/28/23 11:12, Alexander Ivanov wrote:
> In parallels_check_leak() we change file size but don't correct data_end
> field of BDRVParallelsState structure. Fix it.
>
> Signed-off-by: Alexander Ivanov <alexander.ivanov@virtuozzo.com>
> ---
>   block/parallels.c | 1 +
>   1 file changed, 1 insertion(+)
>
> diff --git a/block/parallels.c b/block/parallels.c
> index 658902ae51..8a6e2ba7ee 100644
> --- a/block/parallels.c
> +++ b/block/parallels.c
> @@ -806,6 +806,7 @@ parallels_check_leak(BlockDriverState *bs, BdrvCheckResult *res,
>                   res->check_errors++;
>                   return ret;
>               }
> +            s->data_end = res->image_end_offset >> BDRV_SECTOR_BITS;
>               if (explicit) {
>                   res->leaks_fixed += count;
>               }
Reviewed-by: Denis V. Lunev <den@openvz.org>
diff mbox series

Patch

diff --git a/block/parallels.c b/block/parallels.c
index 658902ae51..8a6e2ba7ee 100644
--- a/block/parallels.c
+++ b/block/parallels.c
@@ -806,6 +806,7 @@  parallels_check_leak(BlockDriverState *bs, BdrvCheckResult *res,
                 res->check_errors++;
                 return ret;
             }
+            s->data_end = res->image_end_offset >> BDRV_SECTOR_BITS;
             if (explicit) {
                 res->leaks_fixed += count;
             }