qemu-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Qemu-devel] [PATCH 1/4] block: add image fragmentation statistics t


From: Stefan Hajnoczi
Subject: Re: [Qemu-devel] [PATCH 1/4] block: add image fragmentation statistics to qemu-img
Date: Mon, 12 Mar 2012 13:26:39 +0000

On Mon, Mar 12, 2012 at 1:14 PM, Kevin Wolf <address@hidden> wrote:
> Am 12.03.2012 14:07, schrieb Stefan Hajnoczi:
>> On Wed, Mar 7, 2012 at 9:22 AM, Dong Xu Wang <address@hidden> wrote:
>>> @@ -1126,6 +1127,14 @@ static int img_info(int argc, char **argv)
>>>             printf("cluster_size: %d\n", bdi.cluster_size);
>>>         }
>>>     }
>>> +    if (bdrv_get_fragment(bs, &bfi) >= 0) {
>>
>> I think we need a separate sub-command for fragmentation info:
>>
>> qemu-img fraginfo <image-file>
>>
>> Utilities that invoke qemu-img info want it to be fast.  Reading all
>> metadata from a large image can take several seconds.  Since 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



reply via email to

[Prev in Thread] Current Thread [Next in Thread]