[Qemu-devel] [PATCH v2 2/6] VMDK: add twoGbMaxExtentSparse support

2011-08-05 Thread Fam Zheng
Add twoGbMaxExtentSparse support. Introduce vmdk_free_last_extent. Signed-off-by: Fam Zheng --- block/vmdk.c | 133 -- 1 files changed, 83 insertions(+), 50 deletions(-) diff --git a/block/vmdk.c b/block/vmdk.c index e22a893..ab15840 1006

Re: [Qemu-devel] [PATCH v2 2/6] VMDK: add twoGbMaxExtentSparse support

2011-08-04 Thread Stefan Hajnoczi
On Thu, Aug 4, 2011 at 11:38 AM, Fam Zheng wrote: > On Thu, Aug 4, 2011 at 6:34 PM, Stefan Hajnoczi wrote: >> On Thu, Aug 4, 2011 at 4:09 AM, Fam Zheng wrote: >>> +static void vmdk_free_last_extent(BlockDriverState *bs) >>> +{ >>> +    BDRVVmdkState *s = bs->opaque; >>> + >>> +    if (s->num_ext

Re: [Qemu-devel] [PATCH v2 2/6] VMDK: add twoGbMaxExtentSparse support

2011-08-04 Thread Fam Zheng
On Thu, Aug 4, 2011 at 6:34 PM, Stefan Hajnoczi wrote: > On Thu, Aug 4, 2011 at 4:09 AM, Fam Zheng wrote: >> +static void vmdk_free_last_extent(BlockDriverState *bs) >> +{ >> +    BDRVVmdkState *s = bs->opaque; >> + >> +    if (s->num_extents == 0) { >> +        return; >> +    } >> +    s->num_e

Re: [Qemu-devel] [PATCH v2 2/6] VMDK: add twoGbMaxExtentSparse support

2011-08-04 Thread Stefan Hajnoczi
On Thu, Aug 4, 2011 at 4:09 AM, Fam Zheng wrote: > +static void vmdk_free_last_extent(BlockDriverState *bs) > +{ > +    BDRVVmdkState *s = bs->opaque; > + > +    if (s->num_extents == 0) { > +        return; > +    } > +    s->num_extents--; > +    s->extents = qemu_realloc(s->extents, s->num_exte

[Qemu-devel] [PATCH v2 2/6] VMDK: add twoGbMaxExtentSparse support

2011-08-03 Thread Fam Zheng
Add twoGbMaxExtentSparse support. Introduce vmdk_free_last_extent. Signed-off-by: Fam Zheng --- block/vmdk.c | 132 -- 1 files changed, 82 insertions(+), 50 deletions(-) diff --git a/block/vmdk.c b/block/vmdk.c index e22a893..be3b860 1006