[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Qemu-devel] [PATCH v2] block: per caller dirty bitmap
From: |
Stefan Hajnoczi |
Subject: |
Re: [Qemu-devel] [PATCH v2] block: per caller dirty bitmap |
Date: |
Mon, 11 Nov 2013 11:31:18 +0100 |
User-agent: |
Mutt/1.5.21 (2010-09-15) |
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
- [Qemu-devel] [PATCH v2] block: per caller dirty bitmap, Fam Zheng, 2013/11/04
- Re: [Qemu-devel] [PATCH v2] block: per caller dirty bitmap, BenoƮt Canet, 2013/11/04
- Re: [Qemu-devel] [PATCH v2] block: per caller dirty bitmap, Stefan Hajnoczi, 2013/11/11
- Re: [Qemu-devel] [PATCH v2] block: per caller dirty bitmap, Stefan Hajnoczi, 2013/11/11
- Re: [Qemu-devel] [PATCH v2] block: per caller dirty bitmap, Kevin Wolf, 2013/11/12