Hi, QCOW2 uses a similar idea like file holes (sparse files) on filesystems [1]. RAW Images also may use file holes.
If qemu would support TRIM, then the guest could easily discard and zero all unused blocks. The host system could detect all unused blocks in a (e.g.) qcow2 image and shrink it down to its minimum size. Did anyone already think about that? [1] : https://people.gnome.org/~markmc/qcow-image-format.html Regards, -- Ralf Ramsauer PGP: 0x8F10049B