On Thu, Feb 07, 2013 at 05:15:00PM +0100, Stefan Hajnoczi wrote: > Applies on kevin/block-next (2700d627e4d73bb2aacb832a93ffac8fec78b1fd). > > This series adds fragmentation info support to qcow2 and then adds compression > info. Previously only QED supported fragmentation info. Note that > fragmentation info only covers the current image, internal snapshots are not > included. > > The new BlockFragInfo.compressed field contains the number of compressed > clusters. qemu-img check now reports the percentage of compressed clusters > out > of all allocated clusters. This can be used to decide when to recompress an > image or to double-check that an image is indeed compressed. > > qemu-iotests was to handle the new qemu-img check output. > > I have tested qcow2 images both compressed and uncompressed. > > v3: > * Add space before '=' in qemu-img check output [kwolf] > * Count compressed clusters as fragmented, explained in comment [kwolf] > > v2: > * Fix indentation on modified block/qcow2-refcount.c lines [eblake] > * Change qemu-img check output from just "compressed" to "compressed > clusters" [eblake] > * Improve grep and sed usage in common.rc [eblake] > * Introduce sector_offset local variable for & ~511 [eblake] > * Improve nb_csectors rounding down explanation in comment [eblake] > > Stefan Hajnoczi (5): > qcow2: introduce check_refcounts_l1/l2() flags > qcow2: record fragmentation statistics during check > qemu-img: fix missing space in qemu-img check output > qemu-img: add compressed clusters to BlockFragInfo > qcow2: support compressed clusters in BlockFragInfo > > block/qcow2-refcount.c | 42 ++++++++++++++++++++++++++++++++++++------ > include/block/block.h | 1 + > qapi-schema.json | 6 +++++- > qemu-img.c | 12 ++++++++---- > tests/qemu-iotests/044.out | 1 + > tests/qemu-iotests/common.rc | 2 +- > 6 files changed, 52 insertions(+), 12 deletions(-) > > -- > 1.8.1 >
Applied to my block-next tree: https://github.com/stefanha/qemu/commits/block-next Stefan