qemu-devel
[Top][All Lists]
Advanced

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

Re: [Qemu-devel] [PATCH 3/5] block/dirty-bitmap: rework bdrv_remove_pers


From: Eric Blake
Subject: Re: [Qemu-devel] [PATCH 3/5] block/dirty-bitmap: rework bdrv_remove_persistent_dirty_bitmap
Date: Thu, 6 Jun 2019 21:24:07 -0500
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:60.0) Gecko/20100101 Thunderbird/60.6.1

On 6/6/19 1:41 PM, John Snow wrote:
> Allow propagating error code information from
> bdrv_remove_persistent_dirty_bitmap as well.
> 
> Give it an interface that matches the newly revised
> bdrv_add_persistent_dirty_bitmap, including removing the persistent flag
> when the operation succeeds and refusing to operate on bitmaps that are
> not persistent.
> 
> Signed-off-by: John Snow <address@hidden>
> ---

> +++ b/include/block/block_int.h
> @@ -540,9 +540,9 @@ struct BlockDriver {
>      int (*bdrv_add_persistent_dirty_bitmap)(BlockDriverState *bs,
>                                              BdrvDirtyBitmap *bitmap,
>                                              Error **errp);
> -    void (*bdrv_remove_persistent_dirty_bitmap)(BlockDriverState *bs,
> -                                                const char *name,
> -                                                Error **errp);
> +    int (*bdrv_remove_persistent_dirty_bitmap)(BlockDriverState *bs,
> +                                               BdrvDirtyBitmap *bitmap,
> +                                               Error **errp);

Would it hurt us (in patch 2 and again here) to add a comment about what
each callback is supposed to do? Just because we've been lousy at
callback interfaces in the past does not mean that we should continue to
omit them.

Reviewed-by: Eric Blake <address@hidden>

-- 
Eric Blake, Principal Software Engineer
Red Hat, Inc.           +1-919-301-3226
Virtualization:  qemu.org | libvirt.org

Attachment: signature.asc
Description: OpenPGP digital signature


reply via email to

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