From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:49705) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1VfomJ-0002CS-4p for qemu-devel@nongnu.org; Mon, 11 Nov 2013 05:31:39 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1VfomA-0005p4-PR for qemu-devel@nongnu.org; Mon, 11 Nov 2013 05:31:31 -0500 Received: from mail-ea0-x234.google.com ([2a00:1450:4013:c01::234]:47348) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1VfomA-0005ol-Ef for qemu-devel@nongnu.org; Mon, 11 Nov 2013 05:31:22 -0500 Received: by mail-ea0-f180.google.com with SMTP id b11so2655206eae.11 for ; Mon, 11 Nov 2013 02:31:21 -0800 (PST) Date: Mon, 11 Nov 2013 11:31:18 +0100 From: Stefan Hajnoczi Message-ID: <20131111103118.GI28264@stefanha-thinkpad.redhat.com> References: <1383557410-18062-1-git-send-email-famz@redhat.com> <527778E9.6000907@redhat.com> <52777B3F.6010402@redhat.com> <52777D33.8010902@redhat.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <52777D33.8010902@redhat.com> Subject: Re: [Qemu-devel] [PATCH v2] block: per caller dirty bitmap List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Paolo Bonzini Cc: kwolf@redhat.com, Fam Zheng , qemu-devel@nongnu.org, stefanha@redhat.com 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