Skip to content

Commit

Permalink
parallels: fix broken parallels_check_data_off()
Browse files Browse the repository at this point in the history
Once we have repaired data_off field in the header we should update
s->data_start which is calculated on the base of it.

Signed-off-by: Denis V. Lunev <den@openvz.org>
Reviewed-by: Alexander Ivanov <alexander.ivanov@virtuozzo.com>
  • Loading branch information
Denis V. Lunev committed Sep 21, 2023
1 parent f025a99 commit 6f2206b
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions block/parallels.c
Original file line number Diff line number Diff line change
Expand Up @@ -531,6 +531,7 @@ parallels_check_data_off(BlockDriverState *bs, BdrvCheckResult *res,
res->corruptions++;
if (fix & BDRV_FIX_ERRORS) {
s->header->data_off = cpu_to_le32(data_off);
s->data_start = data_off;
res->corruptions_fixed++;
}

Expand Down

0 comments on commit 6f2206b

Please sign in to comment.