[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Qemu-block] [PATCH 08/25] qcow2: add bitmaps extension
From: |
Max Reitz |
Subject: |
Re: [Qemu-block] [PATCH 08/25] qcow2: add bitmaps extension |
Date: |
Mon, 29 May 2017 17:34:56 +0200 |
User-agent: |
Mozilla/5.0 (X11; Linux x86_64; rv:52.0) Gecko/20100101 Thunderbird/52.1.0 |
On 2017-05-03 14:25, Vladimir Sementsov-Ogievskiy wrote:
> Add bitmap extension as specified in docs/specs/qcow2.txt.
> For now, just mirror extension header into Qcow2 state and check
> constraints. Also, calculate refcounts for qcow2 bitmaps, to not break
> qemu-img check.
>
> For now, disable image resize if it has bitmaps. It will be fixed later.
>
> Signed-off-by: Vladimir Sementsov-Ogievskiy <address@hidden>
> Reviewed-by: Max Reitz <address@hidden>
> Reviewed-by: John Snow <address@hidden>
> ---
> block/Makefile.objs | 2 +-
> block/qcow2-bitmap.c | 439
> +++++++++++++++++++++++++++++++++++++++++++++++++
> block/qcow2-refcount.c | 6 +
> block/qcow2.c | 124 +++++++++++++-
> block/qcow2.h | 27 +++
> 5 files changed, 592 insertions(+), 6 deletions(-)
> create mode 100644 block/qcow2-bitmap.c
[...]
> diff --git a/block/qcow2.c b/block/qcow2.c
> index 6a92d2ef3f..6028e9a149 100644
> --- a/block/qcow2.c
> +++ b/block/qcow2.c
[...]
> @@ -2542,6 +2649,13 @@ static int qcow2_truncate(BlockDriverState *bs,
> int64_t offset)
> return -ENOTSUP;
> }
>
> + /* cannot proceed if image has bitmaps */
> + if (s->nb_bitmaps) {
> + /* TODO: resize bitmaps in the image */
> + error_report("Can't resize an image which has bitmaps");
Minor note: This needs to be error_setg(errp, ...); now...
> + return -ENOTSUP;
> + }
> +
> /* shrinking is currently not supported */
> if (offset < bs->total_sectors * 512) {
> error_report("qcow2 doesn't support shrinking images yet");
...as does this (which blocks the patch from being applicable).
(But please keep my R-b.)
Max
signature.asc
Description: OpenPGP digital signature
- [Qemu-block] [PATCH 01/25] specs/qcow2: fix bitmap granularity qemu-specific note, (continued)
- [Qemu-block] [PATCH 01/25] specs/qcow2: fix bitmap granularity qemu-specific note, Vladimir Sementsov-Ogievskiy, 2017/05/03
- [Qemu-block] [PATCH 02/25] specs/qcow2: do not use wording 'bitmap header', Vladimir Sementsov-Ogievskiy, 2017/05/03
- [Qemu-block] [PATCH 05/25] block: fix bdrv_dirty_bitmap_granularity signature, Vladimir Sementsov-Ogievskiy, 2017/05/03
- [Qemu-block] [PATCH 24/25] qmp: block-dirty-bitmap-remove: remove persistent, Vladimir Sementsov-Ogievskiy, 2017/05/03
- [Qemu-block] [PATCH 25/25] block: release persistent bitmaps on inactivate, Vladimir Sementsov-Ogievskiy, 2017/05/03
- [Qemu-block] [PATCH 20/25] qmp: add x-debug-block-dirty-bitmap-sha256, Vladimir Sementsov-Ogievskiy, 2017/05/03
- [Qemu-block] [PATCH 12/25] block: bdrv_close: release bitmaps after drv->bdrv_close, Vladimir Sementsov-Ogievskiy, 2017/05/03
- [Qemu-block] [PATCH 04/25] tests: add hbitmap iter test, Vladimir Sementsov-Ogievskiy, 2017/05/03
- [Qemu-block] [PATCH 08/25] qcow2: add bitmaps extension, Vladimir Sementsov-Ogievskiy, 2017/05/03
- Re: [Qemu-block] [PATCH 08/25] qcow2: add bitmaps extension,
Max Reitz <=
- [Qemu-block] [PATCH 23/25] qcow2: add .bdrv_remove_persistent_dirty_bitmap, Vladimir Sementsov-Ogievskiy, 2017/05/03
- [Qemu-block] [PATCH 14/25] block/dirty-bitmap: add bdrv_dirty_bitmap_next(), Vladimir Sementsov-Ogievskiy, 2017/05/03
- [Qemu-block] [PATCH 03/25] hbitmap: improve dirty iter, Vladimir Sementsov-Ogievskiy, 2017/05/03
- [Qemu-block] [PATCH 07/25] qcow2-refcount: rename inc_refcounts() and make it public, Vladimir Sementsov-Ogievskiy, 2017/05/03
- [Qemu-block] [PATCH 15/25] qcow2: add persistent dirty bitmaps support, Vladimir Sementsov-Ogievskiy, 2017/05/03
- [Qemu-block] [PATCH 11/25] block/dirty-bitmap: add autoload field to BdrvDirtyBitmap, Vladimir Sementsov-Ogievskiy, 2017/05/03
- [Qemu-block] ping Re: [PATCH v18 00/25] qcow2: persistent dirty bitmaps, Vladimir Sementsov-Ogievskiy, 2017/05/15