[Top][All Lists]
[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: |
Kevin Wolf |
Subject: |
Re: [Qemu-devel] [PATCH 1/4] block: add image fragmentation statistics to qemu-img |
Date: |
Mon, 12 Mar 2012 14:36:50 +0100 |
User-agent: |
Mozilla/5.0 (X11; Linux x86_64; rv:10.0.1) Gecko/20120209 Thunderbird/10.0.1 |
Am 12.03.2012 14:26, schrieb Stefan Hajnoczi:
> 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?
Sure, that would be the only way to take advantage of the scan that
bdrv_check already performs.
Kevin