Re: [Qemu-devel] [PATCH v6 02/10] qmp: Add block-dirty-bitmap-add and block-dirty-bitmap-remove

2014-11-19 Thread John Snow
On 11/07/2014 07:24 AM, Vladimir Sementsov-Ogievskiy wrote: +if (!name || name[0] == '\0') { Isn't is better to move "name[0] == '\0'" check to bdrv_create_dirty_bitmap, near existed name checking? Hm, OK, but then we still need to check for the presence of a name in these functions, so

Re: [Qemu-devel] [PATCH v6 02/10] qmp: Add block-dirty-bitmap-add and block-dirty-bitmap-remove

2014-11-07 Thread Eric Blake
On 10/30/2014 04:22 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 > --- > blockdev

Re: [Qemu-devel] [PATCH v6 02/10] qmp: Add block-dirty-bitmap-add and block-dirty-bitmap-remove

2014-11-07 Thread Vladimir Sementsov-Ogievskiy
+if (!name || name[0] == '\0') { Isn't is better to move "name[0] == '\0'" check to bdrv_create_dirty_bitmap, near existed name checking? +if (granularity < 512 || is_power_of_2(granularity)) { +error_setg(errp, "Granularity must be power of 2 " +

Re: [Qemu-devel] [PATCH v6 02/10] qmp: Add block-dirty-bitmap-add and block-dirty-bitmap-remove

2014-11-04 Thread Max Reitz
On 2014-10-30 at 04:22, 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 --- blockdev.c

[Qemu-devel] [PATCH v6 02/10] qmp: Add block-dirty-bitmap-add and block-dirty-bitmap-remove

2014-10-29 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 | 55 +