qemu-block
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Qemu-block] [Qemu-devel] [PATCH 24/25] qmp: block-dirty-bitmap-remo


From: John Snow
Subject: Re: [Qemu-block] [Qemu-devel] [PATCH 24/25] qmp: block-dirty-bitmap-remove: remove persistent
Date: Tue, 14 Feb 2017 19:29:30 -0500
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:45.0) Gecko/20100101 Thunderbird/45.7.0


On 02/14/2017 11:59 AM, Vladimir Sementsov-Ogievskiy wrote:
> Remove persistent bitmap from the storage on block-dirty-bitmap-remove.
> 
> Signed-off-by: Vladimir Sementsov-Ogievskiy <address@hidden>
> Reviewed-by: Max Reitz <address@hidden>
> ---
>  blockdev.c | 10 ++++++++++
>  1 file changed, 10 insertions(+)
> 
> diff --git a/blockdev.c b/blockdev.c
> index c41b791..a365cdf 100644
> --- a/blockdev.c
> +++ b/blockdev.c
> @@ -2767,6 +2767,7 @@ void qmp_block_dirty_bitmap_remove(const char *node, 
> const char *name,
>      AioContext *aio_context;
>      BlockDriverState *bs;
>      BdrvDirtyBitmap *bitmap;
> +    Error *local_err = NULL;
>  
>      bitmap = block_dirty_bitmap_lookup(node, name, &bs, &aio_context, errp);
>      if (!bitmap || !bs) {
> @@ -2779,6 +2780,15 @@ void qmp_block_dirty_bitmap_remove(const char *node, 
> const char *name,
>                     name);
>          goto out;
>      }
> +
> +    if (bdrv_dirty_bitmap_get_persistance(bitmap)) {
> +        bdrv_remove_persistent_dirty_bitmap(bs, name, &local_err);
> +        if (local_err != NULL) {
> +            error_propagate(errp, local_err);
> +            goto out;
> +        }
> +    }
> +
>      bdrv_dirty_bitmap_make_anon(bitmap);
>      bdrv_release_dirty_bitmap(bs, bitmap);
>  
> 

Reviewed-by: John Snow <address@hidden>



reply via email to

[Prev in Thread] Current Thread [Next in Thread]