By introducing BlockDriverState compiling qcow2 with DEBUG_ALLOC and DEBUG_EXT
defined got broken.
Define a BdrvCheckResult structure locally which is now needed as the second
argument.
Also fix qcow2_read_extensions() needing BDRVQcowState.
Signed-off-by: Philipp Hahn <hahn@univention.de>
Signed-off-by: Kevin Wolf <kwolf@redhat.com>
if (qcow2_write_snapshots(bs) < 0)
goto fail;
#ifdef DEBUG_ALLOC
- qcow2_check_refcounts(bs);
+ {
+ BdrvCheckResult result = {0};
+ qcow2_check_refcounts(bs, &result);
+ }
#endif
return 0;
fail:
goto fail;
#ifdef DEBUG_ALLOC
- qcow2_check_refcounts(bs);
+ {
+ BdrvCheckResult result = {0};
+ qcow2_check_refcounts(bs, &result);
+ }
#endif
return 0;
fail:
return ret;
}
#ifdef DEBUG_ALLOC
- qcow2_check_refcounts(bs);
+ {
+ BdrvCheckResult result = {0};
+ qcow2_check_refcounts(bs, &result);
+ }
#endif
return 0;
}
while (offset < end_offset) {
#ifdef DEBUG_EXT
+ BDRVQcowState *s = bs->opaque;
/* Sanity check */
if (offset > s->cluster_size)
printf("qcow2_read_extension: suspicious offset %lu\n", offset);
qemu_co_mutex_init(&s->lock);
#ifdef DEBUG_ALLOC
- qcow2_check_refcounts(bs);
+ {
+ BdrvCheckResult result = {0};
+ qcow2_check_refcounts(bs, &result);
+ }
#endif
return ret;