Preview Image Disk Size Counted by Block Driver

In multiple file vmdk disk, qemu-img info doesn’t count any file allocation other than descriptor file (the file pointed by bs->file). A field is added to BlockDriverState to hold actual disk size if block driver itself has its method to count the disk size. If the field is not set by block driver, qemu-img will still query the file size from OS, and ignore the ‘zero’.

The new field is

1
int64_t disk_size;

And now used by vmdk driver to pass the sum of file sizes to qemu-img.

Comments