On 5/11/20 1:16 PM, Eric Blake wrote:
On 5/11/20 4:21 AM, Max Reitz wrote:

+++ b/include/block/block_int.h
@@ -560,6 +560,7 @@ struct BlockDriver {
                               uint64_t parent_perm, uint64_t parent_shared,
                               uint64_t *nperm, uint64_t *nshared);

+    bool (*bdrv_dirty_bitmap_supported)(BlockDriverState *bs);

All BDSs support bitmaps, but only some support persistent dirty
bitmaps, so I think the name should reflect that.

How about .bdrv_dirty_bitmap_supports_persistent?

Bike-shedding myself, it looks like .bdrv_supports_persistent_dirty_bitmap is better (if you go by the naming convention 'noun-verb-details', it makes more sense that a 'bdrv' supports 'persistent dirty bitmaps', than that a 'bdrv dirty bitmap' supports 'persistence', particularly when the parameter is a BlockDriverState rather than a BdrvDirtyBitmap).

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


Reply via email to