[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Qemu-devel] [PATCH v3 07/22] qcow2: Helper function for refcount mo
From: |
Stefan Hajnoczi |
Subject: |
Re: [Qemu-devel] [PATCH v3 07/22] qcow2: Helper function for refcount modification |
Date: |
Fri, 28 Nov 2014 11:11:00 +0000 |
User-agent: |
Mutt/1.5.23 (2014-03-12) |
On Thu, Nov 20, 2014 at 06:06:23PM +0100, Max Reitz wrote:
> @@ -1711,7 +1746,7 @@ static int calculate_refcounts(BlockDriverState *bs,
> BdrvCheckResult *res,
> static void compare_refcounts(BlockDriverState *bs, BdrvCheckResult *res,
> BdrvCheckMode fix, bool *rebuild,
> int64_t *highest_cluster,
> - uint16_t *refcount_table, int64_t nb_clusters)
> + void *refcount_table, int64_t nb_clusters)
> {
> BDRVQcowState *s = bs->opaque;
> int64_t i, refcount1, refcount2;
An -ERANGE qcow2_get_refcount() return value is treated as a check error
here and we won't be able to rebuild the refcount blocks:
refcount1 = qcow2_get_refcount(bs, i);
if (refcount1 < 0) {
fprintf(stderr, "Can't get refcount for cluster %" PRId64 ": %s\n",
i, strerror(-refcount1));
res->check_errors++;
continue;
}
We should allow rebuilding refcount blocks, -ERANGE is just another
corrupted refcount.
pgpxTbQDqT85r.pgp
Description: PGP signature
- Re: [Qemu-devel] [PATCH v3 06/22] qcow2: Helper for refcount array reallocation, (continued)
[Qemu-devel] [PATCH v3 02/22] qcow2: Add refcount_width to format-specific info, Max Reitz, 2014/11/20
[Qemu-devel] [PATCH v3 07/22] qcow2: Helper function for refcount modification, Max Reitz, 2014/11/20
Re: [Qemu-devel] [PATCH v3 07/22] qcow2: Helper function for refcount modification,
Stefan Hajnoczi <=
[Qemu-devel] [PATCH v3 08/22] qcow2: More helpers for refcount modification, Max Reitz, 2014/11/20
[Qemu-devel] [PATCH v3 09/22] qcow2: Open images with refcount order != 4, Max Reitz, 2014/11/20
[Qemu-devel] [PATCH v3 10/22] qcow2: refcount_order parameter for qcow2_create2, Max Reitz, 2014/11/20
[Qemu-devel] [PATCH v3 12/22] qcow2: Allow creation with refcount order != 4, Max Reitz, 2014/11/20