Skip to contentSkip to conversation

[6405] block-qcow2: export highest_allocated through BlockDriverInfo and get_info() ( Uri Lublin)

Qemu-devel Anthony Liguori 1 participant 1 message Jan 22, 2009

lore
Share & tools
lore
#0 lore raw

Revision: 6405

          http://svn.sv.gnu.org/viewvc/?view=rev&root=qemu&revision=6405
Author:   aliguori
Date:     2009-01-22 18:57:26 +0000 (Thu, 22 Jan 2009)

Log Message:
-----------
block-qcow2: export highest_allocated through BlockDriverInfo and get_info() (Uri Lublin)

Modified Paths:
--------------
trunk/block-qcow2.c
trunk/block.h

Modified: trunk/block-qcow2.c
===================================================================

block-qcow2.c +1 -0
@@ -1671,6 +1671,7 @@
     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;
 }
 

Modified: trunk/block.h
===================================================================

block.h +1 -0
@@ -26,6 +26,7 @@
     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 {