[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Qemu-devel] [PATCH 08/25] qcow2: add bitmaps extension
From: |
Max Reitz |
Subject: |
Re: [Qemu-devel] [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-devel] [PATCH 21/25] iotests: test qcow2 persistent dirty bitmap, (continued)
- [Qemu-devel] [PATCH 22/25] block/dirty-bitmap: add bdrv_remove_persistent_dirty_bitmap, Vladimir Sementsov-Ogievskiy, 2017/05/03
- [Qemu-devel] [PATCH 04/25] tests: add hbitmap iter test, Vladimir Sementsov-Ogievskiy, 2017/05/03
- [Qemu-devel] [PATCH 20/25] qmp: add x-debug-block-dirty-bitmap-sha256, Vladimir Sementsov-Ogievskiy, 2017/05/03
- [Qemu-devel] [PATCH 08/25] qcow2: add bitmaps extension, Vladimir Sementsov-Ogievskiy, 2017/05/03
- Re: [Qemu-devel] [PATCH 08/25] qcow2: add bitmaps extension,
Max Reitz <=
- [Qemu-devel] [PATCH 09/25] block/dirty-bitmap: add readonly field to BdrvDirtyBitmap, Vladimir Sementsov-Ogievskiy, 2017/05/03