[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Qemu-devel] [PATCH 08/29] qcow2-bitmap: delete bitmap from qcow2 af
From: |
Kevin Wolf |
Subject: |
Re: [Qemu-devel] [PATCH 08/29] qcow2-bitmap: delete bitmap from qcow2 after load |
Date: |
Thu, 11 Aug 2016 15:18:11 +0200 |
User-agent: |
Mutt/1.5.21 (2010-09-15) |
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 <address@hidden>
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
- [Qemu-devel] [PATCH 14/29] qcow2-bitmap: add qcow2_bitmap_load_check(), (continued)
- [Qemu-devel] [PATCH 14/29] qcow2-bitmap: add qcow2_bitmap_load_check(), Vladimir Sementsov-Ogievskiy, 2016/08/08
- [Qemu-devel] [PATCH 04/29] block/dirty-bitmap: add deserialize_ones func, Vladimir Sementsov-Ogievskiy, 2016/08/08
- [Qemu-devel] [PATCH 07/29] qcow2-bitmap: add qcow2_bitmap_load(), Vladimir Sementsov-Ogievskiy, 2016/08/08
- [Qemu-devel] [PATCH 13/29] qcow2: add dirty bitmaps extension, Vladimir Sementsov-Ogievskiy, 2016/08/08
- [Qemu-devel] [PATCH 21/29] qcow2-bitmap: add EXTRA_DATA_COMPATIBLE flag, Vladimir Sementsov-Ogievskiy, 2016/08/08
- [Qemu-devel] [PATCH 12/29] qcow2: add qcow2_delete_bitmaps, Vladimir Sementsov-Ogievskiy, 2016/08/08
- [Qemu-devel] [PATCH 02/29] tests: add hbitmap iter test, Vladimir Sementsov-Ogievskiy, 2016/08/08
- [Qemu-devel] [PATCH 08/29] qcow2-bitmap: delete bitmap from qcow2 after load, Vladimir Sementsov-Ogievskiy, 2016/08/08
- Re: [Qemu-devel] [PATCH 08/29] qcow2-bitmap: delete bitmap from qcow2 after load,
Kevin Wolf <=
- [Qemu-devel] [PATCH 20/29] qcow2-bitmap: add AUTO flag, Vladimir Sementsov-Ogievskiy, 2016/08/08
- [Qemu-devel] [PATCH 11/29] qcow2-bitmap: check constraints, Vladimir Sementsov-Ogievskiy, 2016/08/08
- [Qemu-devel] [PATCH 19/29] block/dirty-bitmap: add autoload field to BdrvDirtyBitmap, Vladimir Sementsov-Ogievskiy, 2016/08/08
- [Qemu-devel] [PATCH 18/29] qcow2-bitmap: disallow storing bitmap to other bs, Vladimir Sementsov-Ogievskiy, 2016/08/08
- [Qemu-devel] [PATCH 06/29] qcow2-bitmap: add qcow2_read_bitmaps(), Vladimir Sementsov-Ogievskiy, 2016/08/08
- [Qemu-devel] [PATCH 22/29] qmp: add persistent flag to block-dirty-bitmap-add, Vladimir Sementsov-Ogievskiy, 2016/08/08