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

Re: [Xen-devel] [Qemu-devel] [PATCHv3] QEMU(upstream): Disable xen's use of O_DIRECT by default as it results in crashes.



On Tue, 19 Mar 2013, Alex Bligh wrote:
> Stefano, George,
> 
> > This patch only impacts the PV backend in QEMU, not the IDE interface.
> > PV frontends and backends always disconnect and reconnect during
> > save/restore.
> > So we can be *certain* that bdrv_close at the sender side is called
> > before the new connection is established at the receiver side.
> >
> > Unfortunately the QEMU PV backend opens the disk during initialization,
> > so before the actual connection is established (blk_init).
> >
> > Therefore I think that the current change is not safe, but it is pretty
> > easy to make it safe.
> > You just need to move the call to blk_open from blk_init to blk_connect.
> > Actually you can move most of blk_init to blk_connect, you just need to
> > keep the 4 xenstore_write_be_int at the end of the function.
> 
> Stefano: do you want me to come up with a patch to do this?

Yes, please.


> --On 19 March 2013 15:29:36 +0000 George Dunlap 
> <George.Dunlap@xxxxxxxxxxxxx> wrote:
> 
> > Alex, the title of the changelog should certainly be more specific, so
> > people aren't confused.  Maybe something like the following?
> >
> > "Disable use of O_DIRECT when acting as a Xen PV backend"
> >
> > And emphasizing in the changelog that this has no effect on qemu when
> > acting as a device model for Xen?
> 
> Sure, I can do that.
> 
> However, my understanding (possibly incorrect) is that when qemu is
> acting as a device model for xen (i.e. emulated disks) it doesn't
> use O_DIRECT anyway. I am aware this is a different problem!

That is true. My guess is that nobody really migrates HVM guests without
PV drivers installed (it's not even possible on XenServer but xl let you
do that if you want to). When the PV drivers initialize at boot time,
the IDE disk is closed. Therefore we wouldn't have this problem.

Maybe we should prevent HVM guest migration without PV drivers with xl
too. Ian, what do you think? 

_______________________________________________
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®.