[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Qemu-block] [PATCH 16/29] block: add bdrv_load_dirty_bitmap()
From: |
Kevin Wolf |
Subject: |
Re: [Qemu-block] [PATCH 16/29] block: add bdrv_load_dirty_bitmap() |
Date: |
Thu, 11 Aug 2016 13:24:46 +0200 |
User-agent: |
Mutt/1.5.21 (2010-09-15) |
Am 08.08.2016 um 17:05 hat Vladimir Sementsov-Ogievskiy geschrieben:
> The funcion loads dirty bitmap from file, using underlying driver
> function.
>
> Signed-off-by: Vladimir Sementsov-Ogievskiy <address@hidden>
> ---
> block/dirty-bitmap.c | 16 ++++++++++++++++
> include/block/dirty-bitmap.h | 2 ++
> 2 files changed, 18 insertions(+)
>
> diff --git a/block/dirty-bitmap.c b/block/dirty-bitmap.c
> index 6df7fe1..1d0ea25 100644
> --- a/block/dirty-bitmap.c
> +++ b/block/dirty-bitmap.c
> @@ -597,3 +597,19 @@ void
> bdrv_finalize_persistent_dirty_bitmaps(BlockDriverState *bs)
> }
> }
> }
> +
> +BdrvDirtyBitmap *bdrv_load_dirty_bitmap(BlockDriverState *bs, const char
> *name,
> + Error **errp)
> +{
> + BlockDriver *drv = bs->drv;
> + if (!drv) {
> + return NULL;
> + }
> + if (drv->bdrv_dirty_bitmap_load) {
> + return drv->bdrv_dirty_bitmap_load(bs, name, errp);
Why the inconsistency between load_dirty and dirty_load? The bdrv_*
wrappers usually have exactly the same name as the BlockDriver fields.
> + }
> + if (bs->file) {
> + return bdrv_load_dirty_bitmap(bs, name, errp);
> + }
> + return NULL;
> +}
Let me ask a general question about this series: What is the expected
state after it is applied?
I'm asking because even after the full series is applied, I don't see a
single user of bdrv_load_dirty_bitmap(), bdrv_load_check_dirty_bitmap()
or bdrv_store_dirty_bitmap(). Is all of this dead code?
Kevin
- Re: [Qemu-block] [PATCH 06/29] qcow2-bitmap: add qcow2_read_bitmaps(), (continued)
- [Qemu-block] [PATCH 17/29] qcow2-bitmap: add autoclear bit, Vladimir Sementsov-Ogievskiy, 2016/08/08
- [Qemu-block] [PATCH 10/29] qcow2-bitmap: add IN_USE flag, Vladimir Sementsov-Ogievskiy, 2016/08/08
- [Qemu-block] [PATCH 20/29] qcow2-bitmap: add AUTO flag, Vladimir Sementsov-Ogievskiy, 2016/08/08
- [Qemu-block] [PATCH 03/29] block: fix bdrv_dirty_bitmap_granularity signature, Vladimir Sementsov-Ogievskiy, 2016/08/08
- [Qemu-block] [PATCH 29/29] qcow2-dirty-bitmap: refcounts, Vladimir Sementsov-Ogievskiy, 2016/08/08
- [Qemu-block] [PATCH 19/29] block/dirty-bitmap: add autoload field to BdrvDirtyBitmap, Vladimir Sementsov-Ogievskiy, 2016/08/08
- [Qemu-block] [PATCH 23/29] qmp: add autoload parameter to block-dirty-bitmap-add, Vladimir Sementsov-Ogievskiy, 2016/08/08
- [Qemu-block] [PATCH 16/29] block: add bdrv_load_dirty_bitmap(), Vladimir Sementsov-Ogievskiy, 2016/08/08
- Re: [Qemu-block] [PATCH 16/29] block: add bdrv_load_dirty_bitmap(),
Kevin Wolf <=
- [Qemu-block] [PATCH 05/29] qcow2-bitmap: structs and consts, Vladimir Sementsov-Ogievskiy, 2016/08/08
- [Qemu-block] [PATCH 08/29] qcow2-bitmap: delete bitmap from qcow2 after load, Vladimir Sementsov-Ogievskiy, 2016/08/08
- [Qemu-block] [PATCH 18/29] qcow2-bitmap: disallow storing bitmap to other bs, Vladimir Sementsov-Ogievskiy, 2016/08/08
- [Qemu-block] [PATCH 25/29] qapi: add md5 checksum of last dirty bitmap level to query-block, Vladimir Sementsov-Ogievskiy, 2016/08/08
- [Qemu-block] [PATCH 04/29] block/dirty-bitmap: add deserialize_ones func, Vladimir Sementsov-Ogievskiy, 2016/08/08