[prev in list] [next in list] [prev in thread] [next in thread] 

List:       qemu-block
Subject:    Re: [Qemu-block] [PATCH 08/29] qcow2-bitmap: delete bitmap from qcow2 after load
From:       Vladimir Sementsov-Ogievskiy <vsementsov () virtuozzo ! com>
Date:       2016-08-30 15:03:40
Message-ID: 57C5A04C.6080608 () virtuozzo ! com
[Download RAW message or body]

On 11.08.2016 16:18, Kevin Wolf wrote:
> Am 08.08.2016 um 17:04 hat Vladimir Sementsov-Ogievskiy geschrieben:
>> If we load bitmap for r/w bds, it's data in the image should be
>> considered inconsistent from this point. Therefore it is safe to remove
>> it from the image.
>>
>> Signed-off-by: Vladimir Sementsov-Ogievskiy <vsementsov@virtuozzo.com>
> The approach that you're taking (keeping the complete bitmap directory
> in memory in its on-disk format) means that we can't keep pointers to a
> QCow2BitmapHeader anywhere because modifying the directory would move it
> around.
>
> Did you consider using a different in-memory representation like a
> normal list of structs? This would also allow you to use the normal list
> iteration mechanisms (i.e. the existing *_FOREACH macros) instead of the
> rather complex ones you need now.
>
> For example, qcow2 snapshots use a different on-disk and in-memory
> format and the on-disk format is only implemented in the actual
> read/write functions, and anything else can deal with the simpler
> in-memory structures.
>
> Kevin

Hmm. It was some kind of optimization (not to rewrite the whole 
directory when rewriting one entry).. But for now, after deciding to 
clear bitmap directory after reading bitmaps, it(my approach) obviously 
becomes unnecessary complication.. So, I will change this.

-- 
Best regards,
Vladimir



[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic