From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([208.118.235.92]:59237) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1UHznf-0007a0-IF for qemu-devel@nongnu.org; Tue, 19 Mar 2013 12:54:16 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1UHznY-0007tP-32 for qemu-devel@nongnu.org; Tue, 19 Mar 2013 12:54:11 -0400 Received: from mx1.redhat.com ([209.132.183.28]:64289) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1UHznX-0007t9-Qs for qemu-devel@nongnu.org; Tue, 19 Mar 2013 12:54:04 -0400 Message-ID: <51489818.9040709@redhat.com> Date: Tue, 19 Mar 2013 17:53:44 +0100 From: Paolo Bonzini MIME-Version: 1.0 References: <1363609123-20748-1-git-send-email-alex@alex.org.uk> <51471767.8030604@redhat.com> <7AC8953FE45335FB794B6DFE@Ximines.local> <51471F14.7030209@redhat.com> <6D0F4ACDA3B7FCF1A50F8B52@Ximines.local> <5147298C.8080900@redhat.com> <51473E82.1020806@redhat.com> <861AFE1A9C44444FD8BAEE16@Ximines.local> <5147512E.5050501@eu.citrix.com> <5147562E.1090203@redhat.com> <5148414C.7060303@redhat.com> In-Reply-To: Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit Subject: Re: [Qemu-devel] [Xen-devel] [PATCHv3] QEMU(upstream): Disable xen's use of O_DIRECT by default as it results in crashes. List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Stefano Stabellini Cc: Ian Campbell , George Dunlap , Ian Jackson , "qemu-devel@nongnu.org" , xen-devel , Alex Bligh , Anthony Liguori Il 19/03/2013 16:13, Stefano Stabellini ha scritto: > 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. >>From the little I remember about Xen, they go to XenbusStateClosed on the source before invoking the suspend hypercall? And then restart on the destination? If so, that sounds right. Thanks for finding an elegant solution. > 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. Paolo