From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([208.118.235.92]:35394) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1S75Gu-0000uK-7k for qemu-devel@nongnu.org; Mon, 12 Mar 2012 09:26:48 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1S75Gs-0005di-Eu for qemu-devel@nongnu.org; Mon, 12 Mar 2012 09:26:43 -0400 Received: from mail-lb0-f173.google.com ([209.85.217.173]:38143) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1S75Gs-0005d7-5N for qemu-devel@nongnu.org; Mon, 12 Mar 2012 09:26:42 -0400 Received: by lbon3 with SMTP id n3so1095382lbo.4 for ; Mon, 12 Mar 2012 06:26:39 -0700 (PDT) MIME-Version: 1.0 In-Reply-To: <4F5DF6BE.7020707@redhat.com> References: <1331112179-12726-1-git-send-email-wdongxu@linux.vnet.ibm.com> <4F5DF6BE.7020707@redhat.com> Date: Mon, 12 Mar 2012 13:26:39 +0000 Message-ID: From: Stefan Hajnoczi Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable Subject: Re: [Qemu-devel] [PATCH 1/4] block: add image fragmentation statistics to qemu-img List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Kevin Wolf Cc: Dong Xu Wang , qemu-devel@nongnu.org, stefanha@linux.vnet.ibm.com On Mon, Mar 12, 2012 at 1:14 PM, Kevin Wolf wrote: > Am 12.03.2012 14:07, schrieb Stefan Hajnoczi: >> On Wed, Mar 7, 2012 at 9:22 AM, Dong Xu Wang wrote: >>> @@ -1126,6 +1127,14 @@ static int img_info(int argc, char **argv) >>> =A0 =A0 =A0 =A0 =A0 =A0 printf("cluster_size: %d\n", bdi.cluster_size); >>> =A0 =A0 =A0 =A0 } >>> =A0 =A0 } >>> + =A0 =A0if (bdrv_get_fragment(bs, &bfi) >=3D 0) { >> >> I think we need a separate sub-command for fragmentation info: >> >> qemu-img fraginfo >> >> Utilities that invoke qemu-img info want it to be fast. =A0Reading all >> metadata from a large image can take several seconds. =A0Since many >> qemu-img info users don't need to see the fragmentation information, >> it makes sense to put it in a new sub-command. > > Yes. If we wanted to merge it into an existing qemu-img subcommand, I > think check would be the one, as it scans the whole image already today > and fragmentation is something that could be added fairly easily. In that case we might not even need a separate interface/struct. This would just be part of check. Does that sound good? Stefan