From: aliguori Date: Thu, 22 Jan 2009 18:57:26 +0000 (+0000) Subject: block-qcow2: export highest_allocated through BlockDriverInfo and get_info() (Uri... X-Git-Tag: TizenStudio_2.0_p2.3.2~208^2~12881 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=c421820580b721d2f7a5b9b2054ca4ad7d92a84f;p=sdk%2Femulator%2Fqemu.git block-qcow2: export highest_allocated through BlockDriverInfo and get_info() (Uri Lublin) Signed-off-by: Uri Lublin Signed-off-by: Anthony Liguori git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@6405 c046a42c-6fe2-441c-8c8c-71466251a162 --- diff --git a/block-qcow2.c b/block-qcow2.c index e016e8f..7c00ee8 100644 --- a/block-qcow2.c +++ b/block-qcow2.c @@ -1671,6 +1671,7 @@ static int qcow_get_info(BlockDriverState *bs, BlockDriverInfo *bdi) bdi->cluster_size = s->cluster_size; bdi->vm_state_offset = (int64_t)s->l1_vm_state_index << (s->cluster_bits + s->l2_bits); + bdi->highest_alloc = s->highest_alloc << s->cluster_bits; return 0; } diff --git a/block.h b/block.h index 9733409..4334071 100644 --- a/block.h +++ b/block.h @@ -26,6 +26,7 @@ typedef struct BlockDriverInfo { int cluster_size; /* offset at which the VM state can be saved (0 if not possible) */ int64_t vm_state_offset; + int64_t highest_alloc; /* highest allocated block offset (in bytes) */ } BlockDriverInfo; typedef struct QEMUSnapshotInfo {