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
This commit is contained in:
parent
5d4cbd78aa
commit
c421820580
|
@ -1671,6 +1671,7 @@ static int qcow_get_info(BlockDriverState *bs, BlockDriverInfo *bdi)
|
||||||
bdi->cluster_size = s->cluster_size;
|
bdi->cluster_size = s->cluster_size;
|
||||||
bdi->vm_state_offset = (int64_t)s->l1_vm_state_index <<
|
bdi->vm_state_offset = (int64_t)s->l1_vm_state_index <<
|
||||||
(s->cluster_bits + s->l2_bits);
|
(s->cluster_bits + s->l2_bits);
|
||||||
|
bdi->highest_alloc = s->highest_alloc << s->cluster_bits;
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
1
block.h
1
block.h
|
@ -26,6 +26,7 @@ typedef struct BlockDriverInfo {
|
||||||
int cluster_size;
|
int cluster_size;
|
||||||
/* offset at which the VM state can be saved (0 if not possible) */
|
/* offset at which the VM state can be saved (0 if not possible) */
|
||||||
int64_t vm_state_offset;
|
int64_t vm_state_offset;
|
||||||
|
int64_t highest_alloc; /* highest allocated block offset (in bytes) */
|
||||||
} BlockDriverInfo;
|
} BlockDriverInfo;
|
||||||
|
|
||||||
typedef struct QEMUSnapshotInfo {
|
typedef struct QEMUSnapshotInfo {
|
||||||
|
|
Loading…
Reference in a new issue