[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Qemu-block] [PATCH 09/24] qcow2: add .bdrv_load_autoloading_dirty_b
From: |
Max Reitz |
Subject: |
Re: [Qemu-block] [PATCH 09/24] qcow2: add .bdrv_load_autoloading_dirty_bitmaps |
Date: |
Sat, 28 Jan 2017 23:20:11 +0100 |
User-agent: |
Mozilla/5.0 (X11; Linux x86_64; rv:45.0) Gecko/20100101 Thunderbird/45.7.0 |
On 23.01.2017 13:10, Vladimir Sementsov-Ogievskiy wrote:
> Auto loading bitmaps are bitmaps in Qcow2, with the AUTO flag set. They
> are loaded when the image is opened and become BdrvDirtyBitmaps for the
> corresponding drive.
>
> Extra data in bitmaps is not supported for now.
>
> Signed-off-by: Vladimir Sementsov-Ogievskiy <address@hidden>
> ---
> block/Makefile.objs | 2 +-
> block/qcow2-bitmap.c | 712
> +++++++++++++++++++++++++++++++++++++++++++++++++++
> block/qcow2.c | 2 +
> block/qcow2.h | 3 +
> 4 files changed, 718 insertions(+), 1 deletion(-)
> create mode 100644 block/qcow2-bitmap.c
[...]
> new file mode 100644
> index 0000000000..758622dcfc
> --- /dev/null
> +++ b/block/qcow2-bitmap.c
[...]
> +
> +/*
> + * Bitmap List end
> + */
> +
> +static int update_ext_header_and_dir_in_place(BlockDriverState *bs,
> + Qcow2BitmapList *bm_list)
> +{
> + BDRVQcow2State *s = bs->opaque;
> + int ret;
> +
> + if (!(s->autoclear_features & QCOW2_AUTOCLEAR_BITMAPS) ||
> + bm_list == NULL || QSIMPLEQ_EMPTY(bm_list) ||
> + bitmap_list_count(bm_list) != s->nb_bitmaps)
> + {
> + return -EINVAL;
> + }
> +
> + s->autoclear_features &= ~(uint64_t)QCOW2_AUTOCLEAR_BITMAPS;
> + ret = update_header_sync(bs);
This function is defined only in patch 13, until then the code won't
compile; the definition should be moved into this patch.
Max
signature.asc
Description: OpenPGP digital signature
- Re: [Qemu-block] [PATCH 15/24] qcow2: add .bdrv_can_store_new_dirty_bitmap, (continued)
- [Qemu-block] [PATCH 17/24] qmp: add autoload parameter to block-dirty-bitmap-add, Vladimir Sementsov-Ogievskiy, 2017/01/23
- [Qemu-block] [PATCH 02/24] specs/qcow2: do not use wording 'bitmap header', Vladimir Sementsov-Ogievskiy, 2017/01/23
- [Qemu-block] [PATCH 12/24] block/dirty-bitmap: add bdrv_dirty_bitmap_next(), Vladimir Sementsov-Ogievskiy, 2017/01/23
- [Qemu-block] [PATCH 11/24] block: introduce persistent dirty bitmaps, Vladimir Sementsov-Ogievskiy, 2017/01/23
- [Qemu-block] [PATCH 21/24] qcow2-bitmap: refcounts, Vladimir Sementsov-Ogievskiy, 2017/01/23
- [Qemu-block] [PATCH 20/24] qcow2-refcount: rename inc_refcounts() and make it public, Vladimir Sementsov-Ogievskiy, 2017/01/23
- [Qemu-block] [PATCH 09/24] qcow2: add .bdrv_load_autoloading_dirty_bitmaps, Vladimir Sementsov-Ogievskiy, 2017/01/23