[PATCH 09/21] parallels: fix broken parallels_check_data_off()

Denis V. Lunev posted 21 patches 1 year, 1 month ago
Maintainers: Stefan Hajnoczi <stefanha@redhat.com>, "Denis V. Lunev" <den@openvz.org>, Kevin Wolf <kwolf@redhat.com>, Hanna Reitz <hreitz@redhat.com>
There is a newer version of this series
[PATCH 09/21] parallels: fix broken parallels_check_data_off()
Posted by Denis V. Lunev 1 year, 1 month ago
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>
---
 block/parallels.c | 1 +
 1 file changed, 1 insertion(+)

diff --git a/block/parallels.c b/block/parallels.c
index 60ad41b49b..bdc4dd081b 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++;
     }
 
-- 
2.34.1
Re: [PATCH 09/21] parallels: fix broken parallels_check_data_off()
Posted by Alexander Ivanov 1 year, 1 month ago
On 9/15/23 20:41, Denis V. Lunev wrote:
> 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>
> ---
>   block/parallels.c | 1 +
>   1 file changed, 1 insertion(+)
>
> diff --git a/block/parallels.c b/block/parallels.c
> index 60ad41b49b..bdc4dd081b 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++;
>       }
>   

Reviewed-by: Alexander Ivanov <alexander.ivanov@virtuozzo.com>