On 01.02.2017 00:00, Max Reitz wrote: > On 31.01.2017 17:03, Vladimir Sementsov-Ogievskiy wrote:
[...] >> I've started to rewrite it in that way and it seems like deep almost >> always will be false. What about just move call to >> bs->drv->bdrv_remove_persistent_dirty_bitmap() directly to >> qmp_block_dirty_bitmap_remove and add parameter >> 'remove_persistent' (or 'remove_from_storage', to make it maximum >> descriptive) only to this qmp command? > > Or you could add an explicit bdrv_remove_persistent_dirty_bitmap() which > just wraps the bs->drv function. > >> Or even without that parameter, as leaving inconsistent version of >> bitmap in the storage doesn't seem useful. > > Hm, right, the bitmap will be automatically removed from the image once > it's closed, right? [No, it won't.] But you're right, if a persistent bitmap is completely removed by the user, it should probably be always removed from the image file, too. The only use I could think of for dropping a bitmap from memory but wanting to keep it in the file is for keeping it at a certain state. It would make more sense to allow the user to disable a bitmap to achieve this, though. We don't have a block-dirty-bitmap-disable command yet, though, but I guess it shouldn't be too hard to add...? (Anyway, it's something that's out of scope for this series, I think.) Max
signature.asc
Description: OpenPGP digital signature