summary refs log tree commit diff stats
diff options
context:
space:
mode:
authorDenis V. Lunev <den@openvz.org>2023-09-18 20:00:48 +0200
committerDenis V. Lunev <den@openvz.org>2023-09-21 08:47:08 +0200
commit6f2206b0cb12c1c6f6344b1c44036020b363fa9f (patch)
tree3a00d1b49633d8d391633923218ca3682da8e023
parentf025a99e614f730b3d8902158f4c6c2d947eb855 (diff)
downloadfocaccia-qemu-6f2206b0cb12c1c6f6344b1c44036020b363fa9f.tar.gz
focaccia-qemu-6f2206b0cb12c1c6f6344b1c44036020b363fa9f.zip
parallels: fix broken parallels_check_data_off()
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>
-rw-r--r--block/parallels.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/block/parallels.c b/block/parallels.c
index 66c86d87e3..2b5f2b54a0 100644
--- a/block/parallels.c
+++ b/block/parallels.c
@@ -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++;
     }