Re: [Qemu-devel] [PATCH v7 11/19] block: vhdx write support

2013-10-18 Thread Stefan Hajnoczi
On Fri, Oct 18, 2013 at 02:01:03PM +0200, Stefan Hajnoczi wrote: > On Fri, Oct 11, 2013 at 02:17:31PM -0400, Jeff Cody wrote: > > +/* check the payload block state */ > > +switch (s->bat[sinfo.bat_idx] & VHDX_BAT_STATE_BIT_MASK) { > > +case PAYLOAD_BLOCK_ZERO: >

Re: [Qemu-devel] [PATCH v7 11/19] block: vhdx write support

2013-10-18 Thread Stefan Hajnoczi
On Fri, Oct 11, 2013 at 02:17:31PM -0400, Jeff Cody wrote: > +case PAYLOAD_BLOCK_FULLY_PRESENT: > +/* if the file offset address is in the header zone, > + * there is a problem */ > +if (sinfo.file_offset < (1024 * 1024)) { When a block i

Re: [Qemu-devel] [PATCH v7 11/19] block: vhdx write support

2013-10-18 Thread Stefan Hajnoczi
On Fri, Oct 11, 2013 at 02:17:31PM -0400, Jeff Cody wrote: > +/* check the payload block state */ > +switch (s->bat[sinfo.bat_idx] & VHDX_BAT_STATE_BIT_MASK) { > +case PAYLOAD_BLOCK_ZERO: > +/* in this case, we need to preserve zero writes for > +

[Qemu-devel] [PATCH v7 11/19] block: vhdx write support

2013-10-11 Thread Jeff Cody
This adds support for writing to VHDX image files, using coroutines. Writes into the BAT table goes through the VHDX log. Currently, BAT table writes occur when expanding a dynamic VHDX file, and allocating a new BAT entry. Signed-off-by: Jeff Cody --- block/vhdx.c | 196 +++