Re: [Qemu-devel] [PATCH v4 2/9] qmp: Add dirty-bitmap-add and dirty-bitmap-remove

2014-04-01 Thread Fam Zheng
On Thu, 03/27 10:41, Eric Blake wrote: > On 03/27/2014 03:09 AM, Fam Zheng wrote: > > The new command pair is added to manage user created dirty bitmap. The > > dirty bitmap's name is mandatory and must be unique for the same device, > > but different devices can have bitmaps with the same names. >

Re: [Qemu-devel] [PATCH v4 2/9] qmp: Add dirty-bitmap-add and dirty-bitmap-remove

2014-04-01 Thread Fam Zheng
On Thu, 03/27 16:39, Dr. David Alan Gilbert wrote: > Hi Fam, > Could you make this something like block-dirty-bitmap - the RAM migration > also has a dirty bitmap, and it would just make it clearer. Good idea. Thanks, Dave. Fam

Re: [Qemu-devel] [PATCH v4 2/9] qmp: Add dirty-bitmap-add and dirty-bitmap-remove

2014-04-01 Thread Fam Zheng
On Thu, 03/27 16:43, Stefan Hajnoczi wrote: > On Thu, Mar 27, 2014 at 05:09:41PM +0800, Fam Zheng wrote: > > @@ -1713,6 +1713,66 @@ void qmp_block_set_io_throttle(const char *device, > > int64_t bps, int64_t bps_rd, > > } > > } > > > > +void qmp_dirty_bitmap_add(const char *device, const c

Re: [Qemu-devel] [PATCH v4 2/9] qmp: Add dirty-bitmap-add and dirty-bitmap-remove

2014-03-27 Thread Eric Blake
On 03/27/2014 03:09 AM, Fam Zheng wrote: > The new command pair is added to manage user created dirty bitmap. The > dirty bitmap's name is mandatory and must be unique for the same device, > but different devices can have bitmaps with the same names. > > Signed-off-by: Fam Zheng > --- > +++ b/qa

Re: [Qemu-devel] [PATCH v4 2/9] qmp: Add dirty-bitmap-add and dirty-bitmap-remove

2014-03-27 Thread Dr. David Alan Gilbert
Hi Fam, Could you make this something like block-dirty-bitmap - the RAM migration also has a dirty bitmap, and it would just make it clearer. Dave -- Dr. David Alan Gilbert / dgilb...@redhat.com / Manchester, UK

Re: [Qemu-devel] [PATCH v4 2/9] qmp: Add dirty-bitmap-add and dirty-bitmap-remove

2014-03-27 Thread Stefan Hajnoczi
On Thu, Mar 27, 2014 at 05:09:41PM +0800, Fam Zheng wrote: > +if (has_granularity) { > +if (granularity & (granularity - 1)) { > +error_setg(errp, "Granularity must be power of 2"); > +return; > +} > +} else { > +granularity = 65536; > +}

Re: [Qemu-devel] [PATCH v4 2/9] qmp: Add dirty-bitmap-add and dirty-bitmap-remove

2014-03-27 Thread Stefan Hajnoczi
On Thu, Mar 27, 2014 at 05:09:41PM +0800, Fam Zheng wrote: > @@ -1713,6 +1713,66 @@ void qmp_block_set_io_throttle(const char *device, > int64_t bps, int64_t bps_rd, > } > } > > +void qmp_dirty_bitmap_add(const char *device, const char *name, > + bool has_granulari

[Qemu-devel] [PATCH v4 2/9] qmp: Add dirty-bitmap-add and dirty-bitmap-remove

2014-03-27 Thread Fam Zheng
The new command pair is added to manage user created dirty bitmap. The dirty bitmap's name is mandatory and must be unique for the same device, but different devices can have bitmaps with the same names. Signed-off-by: Fam Zheng --- blockdev.c | 60 +