]> Git Repo - qemu.git/commitdiff
block-qcow2: export highest_allocated through BlockDriverInfo and get_info() (Uri...
authoraliguori <aliguori@c046a42c-6fe2-441c-8c8c-71466251a162>
Thu, 22 Jan 2009 18:57:26 +0000 (18:57 +0000)
committeraliguori <aliguori@c046a42c-6fe2-441c-8c8c-71466251a162>
Thu, 22 Jan 2009 18:57:26 +0000 (18:57 +0000)
Signed-off-by: Uri Lublin <[email protected]>
Signed-off-by: Anthony Liguori <[email protected]>
git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@6405 c046a42c-6fe2-441c-8c8c-71466251a162

block-qcow2.c
block.h

index e016e8f004ee972ecc1e76b3a4fdb8c07313d5dc..7c00ee840b9d952e177168b2e89ed6d24009b106 100644 (file)
@@ -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 97334090185ff6b2d1d7961f642d8ba8ee1b56e1..433407196119572fdd3603596e3ddf155e890a0e 100644 (file)
--- 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 {
This page took 0.031463 seconds and 4 git commands to generate.