On Mon, Nov 04, 2013 at 11:55:47AM +0100, Paolo Bonzini wrote: > Il 04/11/2013 11:47, Fam Zheng ha scritto: > >>> > >>> -void bdrv_set_dirty_tracking(BlockDriverState *bs, int granularity); > >>> -int bdrv_get_dirty(BlockDriverState *bs, int64_t sector); > >>> +typedef struct BdrvDirtyBitmap BdrvDirtyBitmap; > >>> +BdrvDirtyBitmap *bdrv_create_dirty_bitmap(BlockDriverState *bs, int > >>> granularity); > >>> +void bdrv_release_dirty_bitmap(BlockDriverState *bs, BdrvDirtyBitmap > >>> *bitmap); > >>> +int bdrv_get_dirty(BlockDriverState *bs, BdrvDirtyBitmap *bitmap, > >>> int64_t sector); > >>> void bdrv_set_dirty(BlockDriverState *bs, int64_t cur_sector, int > >>> nr_sectors); > >>> void bdrv_reset_dirty(BlockDriverState *bs, int64_t cur_sector, int > >>> nr_sectors); > >>> -void bdrv_dirty_iter_init(BlockDriverState *bs, struct HBitmapIter > >>> *hbi); > >>> -int64_t bdrv_get_dirty_count(BlockDriverState *bs); > >>> +void bdrv_dirty_iter_init(BlockDriverState *bs, > >>> + BdrvDirtyBitmap *bitmap, struct > >>> HBitmapIter *hbi); > >>> +int64_t bdrv_get_dirty_count(BlockDriverState *bs, BdrvDirtyBitmap > >>> *bitmap); > >>> void bdrv_enable_copy_on_read(BlockDriverState *bs); > >>> void bdrv_disable_copy_on_read(BlockDriverState *bs); > >> You do not really need the BDS argument to the functions, do you? (Or > >> do you have other plans?) > > > > I just wanted to keep the pattern of those bdrv_* family, no other plans > > for it. > > Kevin, Stefan, any second opinions?
I was thinking the same thing and arrived at the conclusion that since it's bdrv_*() and not bbitmap_*() we should keep the explicit BDS argument. Stefan