* [Qemu-devel] [PATCH 2/3] block-qcow2: export highest_allocated through BlockDriverInfo and get_info()
@ 2009-01-08 18:53 Uri Lublin
0 siblings, 0 replies; only message in thread
From: Uri Lublin @ 2009-01-08 18:53 UTC (permalink / raw)
To: qemu-devel; +Cc: Uri Lublin
From: Uri Lublin <uril@redhat.com>
Signed-off-by: Uri Lublin <uril@redhat.com>
---
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 184c70c..b8ef825 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
^ permalink raw reply related [flat|nested] only message in thread
only message in thread, other threads:[~2009-01-08 18:53 UTC | newest]
Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2009-01-08 18:53 [Qemu-devel] [PATCH 2/3] block-qcow2: export highest_allocated through BlockDriverInfo and get_info() Uri Lublin
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).