[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Xen-devel] [PATCH 1/3] qemu-xen-traditional: use O_DIRECT to open disk images for IDE [and 1 more messages]



On Fri, 30 Mar 2012, Ian Jackson wrote:
> Stefano Stabellini writes ("Re: [Xen-devel] [PATCH 1/3] qemu-xen-traditional: 
> use O_DIRECT to open disk images for IDE [and 1 more messages]"):
> > In qemu-xen you can easily have this sequence of calls:
> > 
> > bdrv_co_writev -> qcow2_co_writev -> qcow2_alloc_cluster_offset ->
> > get_cluster_table -> qcow2_grow_l1_table -> bdrv_pwrite_sync
> ...
> > In qemu-xen-traditional they would become:
> > 
> > qcow_aio_write_cb -> alloc_cluster_offset -> get_cluster_table ->
> > grow_l1_table -> bdrv_pwrite
> > 
> > 
> > The key piece of information is that bdrv_pwrite_sync issues a
> > bdrv_flush if the file was opened as WB, while bdrv_pwrite does not.
> 
> Yes, but why does this matter ?  If the guest cares about the data
> then it will either turn off caching entirely, or issue an explicit
> flush operation, which will translate into a bdrv_flush.  So the flush
> will happen.
 
If the QCOW2 metadata is written/updated in response to events other
than bdrv_write, they could still get out of sync.

However giving a look at block-qcow2.c I wasn't able to find any such
cases (aside snapshots that we don't support), so it should be OK to use
WB with IDE and QCOW2 on qemu-xen-traditional too.

_______________________________________________
Xen-devel mailing list
Xen-devel@xxxxxxxxxxxxx
http://lists.xen.org/xen-devel


 


Rackspace

Lists.xenproject.org is hosted with RackSpace, monitoring our
servers 24x7x365 and backed by RackSpace's Fanatical Support®.