On 05/30/2017 10:27 AM, Vladimir Sementsov-Ogievskiy wrote: > 30.05.2017 17:53, Eric Blake wrote: >> On 05/30/2017 05:48 AM, Vladimir Sementsov-Ogievskiy wrote: >>> The function should collect statistics, about allocted/unallocated by >>> top-level format driver space (in its .file) and allocation status >>> (allocated/hole/after eof) of corresponding areas in this .file. >>>
>>> +# @alloc_hole: allocated by format driver but actually is a hole in >>> +# underlying file >> The portions of the format file in use by the format, but where the >> entire cluster is a hole in the underlying file (note that with cluster >> size large enough, you can get a cluster that is part-data/part-hole in >> the underlying file, it looks like you are counting those as data). > > No, I account on sector boundary on bs->file. So it is not cluster-aligned. Okay, worth knowing (and therefore worth including in the documentation). > >> >>> +# >>> +# @alloc_overhead: allocated by format driver after end of >>> underlying file >> The portions of the format file in use by the format, but where the >> entire cluster is beyond the end of the underlying file (the effective >> hole). Do we really need to distinguish between hole within the >> underlying file and hole beyond the end of the file? Or can this number >> be combined with the previous? > > alloc_alloc + alloc_hole + hole_alloc + hole_hole = size of bs->file, I > think this is good and clear. That relationship is worth including in the documentation. > > these 4 stats describes bs->file usage in details (not on cluster > boundary, but on sector, based on bs->file block status), alloc_overhead > is separate. I'd lean more towards alloc-overrun than alloc-overhead (we have metadata overhead no matter what, but overrun does a nice job of explaining offsets that are important to the format but which are not present in the underlying protocol). -- Eric Blake, Principal Software Engineer Red Hat, Inc. +1-919-301-3266 Virtualization: qemu.org | libvirt.org
signature.asc
Description: OpenPGP digital signature