Commit c421820580b721d2f7a5b9b2054ca4ad7d92a84f
1 parent
5d4cbd78
block-qcow2: export highest_allocated through BlockDriverInfo and get_info() (Uri Lublin)
Signed-off-by: Uri Lublin <uril@redhat.com> Signed-off-by: Anthony Liguori <aliguori@us.ibm.com> git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@6405 c046a42c-6fe2-441c-8c8c-71466251a162
Showing
2 changed files
with
2 additions
and
0 deletions
block-qcow2.c
... | ... | @@ -1671,6 +1671,7 @@ static int qcow_get_info(BlockDriverState *bs, BlockDriverInfo *bdi) |
1671 | 1671 | bdi->cluster_size = s->cluster_size; |
1672 | 1672 | bdi->vm_state_offset = (int64_t)s->l1_vm_state_index << |
1673 | 1673 | (s->cluster_bits + s->l2_bits); |
1674 | + bdi->highest_alloc = s->highest_alloc << s->cluster_bits; | |
1674 | 1675 | return 0; |
1675 | 1676 | } |
1676 | 1677 | ... | ... |
block.h
... | ... | @@ -26,6 +26,7 @@ typedef struct BlockDriverInfo { |
26 | 26 | int cluster_size; |
27 | 27 | /* offset at which the VM state can be saved (0 if not possible) */ |
28 | 28 | int64_t vm_state_offset; |
29 | + int64_t highest_alloc; /* highest allocated block offset (in bytes) */ | |
29 | 30 | } BlockDriverInfo; |
30 | 31 | |
31 | 32 | typedef struct QEMUSnapshotInfo { | ... | ... |