From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:58735) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Uz8Z2-0006Yl-0L for qemu-devel@nongnu.org; Tue, 16 Jul 2013 12:57:25 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1Uz8Z0-0006Rt-IF for qemu-devel@nongnu.org; Tue, 16 Jul 2013 12:57:23 -0400 Received: from mx1.redhat.com ([209.132.183.28]:16343) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Uz8Z0-0006Re-Ak for qemu-devel@nongnu.org; Tue, 16 Jul 2013 12:57:22 -0400 Message-ID: <51E57B61.2040606@redhat.com> Date: Tue, 16 Jul 2013 18:57:05 +0200 From: Paolo Bonzini MIME-Version: 1.0 References: <1373992168-26043-1-git-send-email-pbonzini@redhat.com> <51E57B2A.7050100@redhat.com> In-Reply-To: <51E57B2A.7050100@redhat.com> Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit Subject: Re: [Qemu-devel] [PATCH v2 00/17] Add qemu-img subcommand to dump file metadata List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Eric Blake Cc: famz@redhat.com, pl@kamp.de, qemu-devel@nongnu.org, stefanha@redhat.com -----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-----