From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:60641) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1V08FM-0001Wi-6Z for qemu-devel@nongnu.org; Fri, 19 Jul 2013 06:49:13 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1V08FK-0005QT-GV for qemu-devel@nongnu.org; Fri, 19 Jul 2013 06:49:12 -0400 Received: from e28smtp04.in.ibm.com ([122.248.162.4]:41805) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1V08FJ-0005Q0-Tw for qemu-devel@nongnu.org; Fri, 19 Jul 2013 06:49:10 -0400 Received: from /spool/local by e28smtp04.in.ibm.com with IBM ESMTP SMTP Gateway: Authorized Use Only! Violators will be prosecuted for from ; Fri, 19 Jul 2013 16:12:07 +0530 Received: from d28relay02.in.ibm.com (d28relay02.in.ibm.com [9.184.220.59]) by d28dlp02.in.ibm.com (Postfix) with ESMTP id 5F7873940053 for ; Fri, 19 Jul 2013 16:18:58 +0530 (IST) Received: from d28av05.in.ibm.com (d28av05.in.ibm.com [9.184.220.67]) by d28relay02.in.ibm.com (8.13.8/8.13.8/NCO v10.0) with ESMTP id r6JAnpLG26345618 for ; Fri, 19 Jul 2013 16:19:52 +0530 Received: from d28av05.in.ibm.com (loopback [127.0.0.1]) by d28av05.in.ibm.com (8.14.4/8.13.1/NCO v10.0 AVout) with ESMTP id r6JAn0Vt019642 for ; Fri, 19 Jul 2013 20:49:01 +1000 Message-ID: <51E91991.20000@linux.vnet.ibm.com> Date: Fri, 19 Jul 2013 18:48:49 +0800 From: Wenchao Xia MIME-Version: 1.0 References: <1373992168-26043-1-git-send-email-pbonzini@redhat.com> <51E57B2A.7050100@redhat.com> <51E57B61.2040606@redhat.com> In-Reply-To: <51E57B61.2040606@redhat.com> Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 8bit 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: Paolo Bonzini Cc: pl@kamp.de, famz@redhat.com, qemu-devel@nongnu.org, stefanha@redhat.com 于 2013-7-17 0:57, Paolo Bonzini 写道: > -----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 > I think dump of allocated info in qemu-img in this series, can do dirty change tracking job for backing chain snapshot now, qemu's QMP interface is not very needed. Only thing not perfect, is that it talks with string. A library would be better, but I am not selling libqblock:), instead I'd like to form a better and clean library so want to adjust qemu's block layer first. >>> >>> 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----- > -- Best Regards Wenchao Xia