diff options
author | Dong Xu Wang <wdongxu@linux.vnet.ibm.com> | 2012-03-15 20:13:31 +0800 |
---|---|---|
committer | Kevin Wolf <kwolf@redhat.com> | 2012-04-05 14:54:40 +0200 |
commit | f8111c241afa75544032dcfa23df0699c91f9866 (patch) | |
tree | 43f9bd6d27759201855a1cb421a961794c813efe /block.h | |
parent | dc534f8fc045a51a8eb678ab3d330fba1e9e631c (diff) | |
download | qemu-f8111c241afa75544032dcfa23df0699c91f9866.zip qemu-f8111c241afa75544032dcfa23df0699c91f9866.tar.gz qemu-f8111c241afa75544032dcfa23df0699c91f9866.tar.bz2 |
qemu-img: add image fragmentation statistics
Discussion can be found at:
http://patchwork.ozlabs.org/patch/128730/
This patch add image fragmentation statistics while using qemu-img check.
Signed-off-by: Dong Xu Wang <wdongxu@linux.vnet.ibm.com>
Reviewed-by: Stefan Hajnoczi <stefanha@linux.vnet.ibm.com>
Signed-off-by: Kevin Wolf <kwolf@redhat.com>
Diffstat (limited to 'block.h')
-rw-r--r-- | block.h | 7 |
1 files changed, 7 insertions, 0 deletions
@@ -17,6 +17,12 @@ typedef struct BlockDriverInfo { int64_t vm_state_offset; } BlockDriverInfo; +typedef struct BlockFragInfo { + uint64_t allocated_clusters; + uint64_t total_clusters; + uint64_t fragmented_clusters; +} BlockFragInfo; + typedef struct QEMUSnapshotInfo { char id_str[128]; /* unique snapshot id */ /* the following fields are informative. They are not needed for @@ -175,6 +181,7 @@ typedef struct BdrvCheckResult { int corruptions; int leaks; int check_errors; + BlockFragInfo bfi; } BdrvCheckResult; int bdrv_check(BlockDriverState *bs, BdrvCheckResult *res); |