Re: [Qemu-devel] [[PATCH v2] 1/1] vpc.c: Add VHD resize support

2014-09-23 Thread Stefan Hajnoczi
On Mon, Sep 22, 2014 at 01:24:16PM +, Lucian Petrut wrote: > >> +if (cpu_to_be32(footer->type) == VHD_DIFFERENCING) { > >footer_buf is big-endian so this should be be32_to_cpu() > > My bad, I’ll fix the BE related issues. The existing block/vpc.c code confuses beX_to_cpu() and cpu_to_be

Re: [Qemu-devel] [[PATCH v2] 1/1] vpc.c: Add VHD resize support

2014-09-22 Thread Lucian Petrut
Thanks for reviewing this patch! I’ll send a new one, fixing the issues you’ve pointed out, along with some tests. Please see my inline comments bellow. Regards, Lucian Petrut​ >From: Stefan Hajnoczi >Sent: ‎Monday‎, ‎September‎ ‎22‎, ‎2014 ‎3‎:‎17‎ ‎PM >To: Petrut Lucian >Cc: qemu-devel@no

Re: [Qemu-devel] [[PATCH v2] 1/1] vpc.c: Add VHD resize support

2014-09-22 Thread Stefan Hajnoczi
On Fri, Sep 19, 2014 at 12:59:46PM +0300, Lucian Petrut wrote: > Note that this patch assumes that all the data blocks are written > right after the BAT. Are there any known files out there where this is not the case? Perhaps an error should be printed if a data block that requires moving does no

[Qemu-devel] [[PATCH v2] 1/1] vpc.c: Add VHD resize support

2014-09-19 Thread Lucian Petrut
This patch introduces resize support for dynamic and fixed VHD images. Note that differencing VHD images do not support this operation. In order to resize dynamic VHDs, the BAT region may need to be extended. This may require moving the first data blocks, making room for it to expand. This requir