-----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 Il 16/07/2013 18:56, Eric Blake ha scritto: > On 07/16/2013 10:29 AM, Paolo Bonzini wrote: >> This series adds a subcommand to "map" that can dump file >> metadata. Metadata that is dumped includes: >> >> - whether blocks are allocated in bs->file and, if so, where >> >> - whether blocks are zero >> >> - whether data is read from bs or bs->backing_hd > > Is this command only usable from qemu-img, or is there a QMP > counterpart for getting at the same information on a live image > while qemu is running?
Not yet, we had no use case yet. It may be exposed later to the guests via the SCSI command GET LBA STATUS. Paolo >> >> Metadata is dumped for an entire chain of images. One example >> usage is (for non-compressed, non-encrypted images) to transform >> the metadata into a Linux device-mapper setup, and make a qcow2 >> image available (for read only) as a block device. Another >> possible usage is to determine the used areas of a file, and >> convert it in place to another format. Alternatively, the richer >> data can be used by block jobs to quickly determine if a block is >> zero without reading it. > > Definitely useful information! I haven't looked at the > implementation yet, but there had better be a JSON representation > of the output :) > -----BEGIN PGP SIGNATURE----- Version: GnuPG v2.0.19 (GNU/Linux) Comment: Using GnuPG with Thunderbird - http://www.enigmail.net/ iQIcBAEBAgAGBQJR5XtfAAoJEBvWZb6bTYbypRUP/jadsxWgkWGbefpIqUL7Iykt EiPeQfuwJNrq2uXU5orD11xkJbm5gElg/iLQBfBnpAZTJ9VNKTkGUwwhAPgLfIrT LkTwd7Puqbe8q965K7kXqDoxT5fN+5nyyE9TbvlOEkThLRebWGVEgfViKoqnPYFW ApejY05zmWrT9+wk984/ELNH0XAv54vITGGzrkgFKpt+h+MZ/1ZQfy3xapczBPTh ui+U9Y2zJ3vdE3JxYGxNM0IVAWvrn0prCRpgGF+Id1uaT839UuYU1ukEFxJpynrh iXHuryQgI2zNx4IDwSwIXfOLc1P0XR59eOaN+n+mw45faIOEaEOlChSC4SvDCtTT 3B1bK7ZqTFy8P8KQ+SjA4NIkl8yb7qLmEGmweJnSxSI1JUz/P3k+uC/FZd/Zxe/r nFVdXYQtKVCZW0CMBMdHRE2T/3PFlx2nz/dzW+OrKyweKpDqcYjU+TyyrvXiT5Yv E8ttpOzQsNJl+VdEWpfa4StgRgQxmazVM80OyE52cNKAixUyLpJ7pR4fsF1mcswc BWdpSe/J8T6LRyTOAKoWoi2w8Mw/DMey4neQ1+py8tWuCqJix3NtyduVtsvrRiYd aPcXvGfAvDbzEcMHnwz0SVpTqleK/7H7pYScBdWYnmUG5wJuxfhJHD/5JDQ1wmj0 jGHmCAddWW+8RrHZGrpX =paUV -----END PGP SIGNATURE-----