Hi all. See 01 patch for the doc.
v3: - improve docs - rename fields - add 'zero' type of underlying file portions status. It as these areas cannot be presented as 'discarded', but they are not occupying real space, so we don't want to present them as 'allocated data' too. - remove last patch. It is not needed after introducing new naming for the fields v2: fix build error, gcc things that some variables may be used uninitialized (actually they didn't). v1: These series is a replacement for "qemu-img check: unallocated size" series. There was a question, should we account allocated clusters in qcow2 but actually holes in underalying file as allocated or not. Instead of hiding this information in one-number statistic I've decided to print the whole information, 5 numbers: For allocated by top-level format driver (qcow2 for ex.) clusters, 3 numbers: number of bytes, which are: - allocated in underlying file - holes in underlying file - after end of underlying file To account other areas of underlying file, 2 more numbers of bytes: - unallocated by top-level driver but allocated in underlying file - unallocated by top-level driver and holes in underlying file Vladimir Sementsov-Ogievskiy (3): block: add bdrv_get_format_alloc_stat format interface qcow2: add .bdrv_get_format_alloc_stat qemu-img check: add format allocation info block.c | 16 +++++ block/qcow2-refcount.c | 152 ++++++++++++++++++++++++++++++++++++++++++++++ block/qcow2.c | 2 + block/qcow2.h | 2 + include/block/block.h | 3 + include/block/block_int.h | 2 + qapi/block-core.json | 61 ++++++++++++++++++- qemu-img.c | 42 +++++++++++++ 8 files changed, 279 insertions(+), 1 deletion(-) -- 2.11.1