From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1LPx2h-0002L7-Hh for qemu-devel@nongnu.org; Thu, 22 Jan 2009 05:44:11 -0500 Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1LPx2c-0002Gy-Rs for qemu-devel@nongnu.org; Thu, 22 Jan 2009 05:44:09 -0500 Received: from [199.232.76.173] (port=37245 helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1LPx2b-0002GY-RO for qemu-devel@nongnu.org; Thu, 22 Jan 2009 05:44:05 -0500 Received: from mx2.redhat.com ([66.187.237.31]:58657) by monty-python.gnu.org with esmtp (Exim 4.60) (envelope-from ) id 1LPx2b-0000pS-AG for qemu-devel@nongnu.org; Thu, 22 Jan 2009 05:44:05 -0500 Received: from int-mx2.corp.redhat.com (int-mx2.corp.redhat.com [172.16.27.26]) by mx2.redhat.com (8.13.8/8.13.8) with ESMTP id n0MAi4S4014813 for ; Thu, 22 Jan 2009 05:44:04 -0500 From: Uri Lublin Date: Thu, 22 Jan 2009 12:43:52 +0200 Message-Id: <1232621035-4951-3-git-send-email-uril@redhat.com> In-Reply-To: <1232621035-4951-2-git-send-email-uril@redhat.com> References: <1232621035-4951-1-git-send-email-uril@redhat.com> <1232621035-4951-2-git-send-email-uril@redhat.com> Subject: [Qemu-devel] [PATCH 2/5 v2] block-qcow2: export highest_allocated through BlockDriverInfo and get_info() Reply-To: qemu-devel@nongnu.org List-Id: qemu-devel.nongnu.org List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: qemu-devel@nongnu.org Cc: Uri Lublin Signed-off-by: Uri Lublin --- block-qcow2.c | 1 + block.h | 1 + 2 files changed, 2 insertions(+), 0 deletions(-) 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 c3314a1..9c64af3 100644 --- a/block.h +++ b/block.h @@ -25,6 +25,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 { -- 1.6.0.6