Re: [Qemu-devel] [PATCH 1/3 v9] add-cow file format

2012-06-04 Thread Dong Xu Wang
Okay, thanks all of your comments, if no other comments, I will write next version. On Wed, May 30, 2012 at 4:20 PM, Stefan Hajnoczi wrote: > On Wed, May 30, 2012 at 2:50 AM, Dong Xu Wang > wrote: >> On Tue, May 29, 2012 at 11:50 PM, Stefan Hajnoczi wrote: > > I thought a bit more about lockin

Re: [Qemu-devel] [PATCH 1/3 v9] add-cow file format

2012-05-30 Thread Stefan Hajnoczi
On Wed, May 30, 2012 at 2:50 AM, Dong Xu Wang wrote: > On Tue, May 29, 2012 at 11:50 PM, Stefan Hajnoczi wrote: I thought a bit more about locking. Because the metadata is simple not much locking is necessary except when fetching new bitmap clusters from the image file into the cache and when p

Re: [Qemu-devel] [PATCH 1/3 v9] add-cow file format

2012-05-30 Thread Kevin Wolf
Am 30.05.2012 04:10, schrieb Anthony Liguori: > On 05/08/2012 01:34 AM, Dong Xu Wang wrote: >> Provide a new file format: add-cow. The usage can be found in add-cow.txt of >> this patch. >> >> CC: Kevin Wolf >> CC: Stefan Hajnoczi >> Signed-off-by: Dong Xu Wang > > You should split out the spec to

Re: [Qemu-devel] [PATCH 1/3 v9] add-cow file format

2012-05-29 Thread Anthony Liguori
On 05/08/2012 01:34 AM, Dong Xu Wang wrote: Provide a new file format: add-cow. The usage can be found in add-cow.txt of this patch. CC: Kevin Wolf CC: Stefan Hajnoczi Signed-off-by: Dong Xu Wang You should split out the spec to be the first patch. That makes it easier for people to review t

Re: [Qemu-devel] [PATCH 1/3 v9] add-cow file format

2012-05-29 Thread Dong Xu Wang
On Tue, May 29, 2012 at 11:50 PM, Stefan Hajnoczi wrote: >> +    image_sectors = image_bs->total_sectors; > > Please use bdrv_getlength() instead of accessing total_sectors directly. > >> +    image_drv = bdrv_find_format("raw"); >> +    ret = bdrv_open(s->image_hd, image_filename, flags, image_dr

Re: [Qemu-devel] [PATCH 1/3 v9] add-cow file format

2012-05-29 Thread Stefan Hajnoczi
> +    image_sectors = image_bs->total_sectors; Please use bdrv_getlength() instead of accessing total_sectors directly. > +    image_drv = bdrv_find_format("raw"); > +    ret = bdrv_open(s->image_hd, image_filename, flags, image_drv); > +    if (ret < 0) { > +        bdrv_delete(s->image_hd); >

[Qemu-devel] [PATCH 1/3 v9] add-cow file format

2012-05-07 Thread Dong Xu Wang
Provide a new file format: add-cow. The usage can be found in add-cow.txt of this patch. CC: Kevin Wolf CC: Stefan Hajnoczi Signed-off-by: Dong Xu Wang --- Makefile.objs |1 + block.c|2 +- block.h|1 + block/add-cow-cache.c | 193