All of lore.kernel.org
 help / color / mirror / Atom feed
From: Fam Zheng <famz@redhat.com>
To: Paolo Bonzini <pbonzini@redhat.com>
Cc: kwolf@redhat.com, qemu-devel@nongnu.org, stefanha@redhat.com
Subject: Re: [Qemu-devel] [PATCH v2] block: per caller dirty bitmap
Date: Mon, 04 Nov 2013 18:47:27 +0800	[thread overview]
Message-ID: <52777B3F.6010402@redhat.com> (raw)
In-Reply-To: <527778E9.6000907@redhat.com>


On 11/04/2013 06:37 PM, Paolo Bonzini wrote:
> Il 04/11/2013 10:30, Fam Zheng ha scritto:
>> diff --git a/include/block/block.h b/include/block/block.h
>> index 3560deb..06f424c 100644
>> --- a/include/block/block.h
>> +++ b/include/block/block.h
>> @@ -388,12 +388,15 @@ void *qemu_blockalign(BlockDriverState *bs, size_t size);
>>   bool bdrv_qiov_is_aligned(BlockDriverState *bs, QEMUIOVector *qiov);
>>   
>>   struct HBitmapIter;
>> -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.

Fam

  reply	other threads:[~2013-11-04 10:47 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-11-04  9:30 [Qemu-devel] [PATCH v2] block: per caller dirty bitmap Fam Zheng
2013-11-04 10:37 ` Paolo Bonzini
2013-11-04 10:47   ` Fam Zheng [this message]
2013-11-04 10:55     ` Paolo Bonzini
2013-11-11 10:31       ` Stefan Hajnoczi
2013-11-04 14:38 ` Benoît Canet
2013-11-05  3:12   ` Fam Zheng
2013-11-11 10:34 ` Stefan Hajnoczi
2013-11-11 10:35 ` Stefan Hajnoczi
2013-11-12 10:46 ` Kevin Wolf
2013-11-12 13:06   ` Eric Blake

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=52777B3F.6010402@redhat.com \
    --to=famz@redhat.com \
    --cc=kwolf@redhat.com \
    --cc=pbonzini@redhat.com \
    --cc=qemu-devel@nongnu.org \
    --cc=stefanha@redhat.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.