[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
signature.asc
Description: OpenPGP digital signature
- [Qemu-devel] [PATCH 0/5] block/dirty-bitmap: check number and size constraints against queued bitmaps, John Snow, 2019/06/06
- [Qemu-devel] [PATCH 1/5] block/qcow2-bitmap: allow bitmap_list_load to return an error code, John Snow, 2019/06/06
- [Qemu-devel] [PATCH 3/5] block/dirty-bitmap: rework bdrv_remove_persistent_dirty_bitmap, John Snow, 2019/06/06
- [Qemu-devel] [PATCH 2/5] block/dirty-bitmap: Refactor bdrv_can_store_new_bitmap, John Snow, 2019/06/06
- Re: [Qemu-devel] [PATCH 2/5] block/dirty-bitmap: Refactor bdrv_can_store_new_bitmap, Eric Blake, 2019/06/06
- Re: [Qemu-devel] [PATCH 2/5] block/dirty-bitmap: Refactor bdrv_can_store_new_bitmap, Vladimir Sementsov-Ogievskiy, 2019/06/07
- Re: [Qemu-devel] [PATCH 2/5] block/dirty-bitmap: Refactor bdrv_can_store_new_bitmap, John Snow, 2019/06/07
- Re: [Qemu-devel] [PATCH 2/5] block/dirty-bitmap: Refactor bdrv_can_store_new_bitmap, Eric Blake, 2019/06/07
- Re: [Qemu-devel] [PATCH 2/5] block/dirty-bitmap: Refactor bdrv_can_store_new_bitmap, Vladimir Sementsov-Ogievskiy, 2019/06/07
- Re: [Qemu-devel] [PATCH 2/5] block/dirty-bitmap: Refactor bdrv_can_store_new_bitmap, Vladimir Sementsov-Ogievskiy, 2019/06/07
- Re: [Qemu-devel] [PATCH 2/5] block/dirty-bitmap: Refactor bdrv_can_store_new_bitmap, John Snow, 2019/06/07