From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1Mvy3R-0002yX-Ql for qemu-devel@nongnu.org; Thu, 08 Oct 2009 14:49:34 -0400 Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1Mvy3L-0002n3-NG for qemu-devel@nongnu.org; Thu, 08 Oct 2009 14:49:31 -0400 Received: from [199.232.76.173] (port=33770 helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1Mvy3L-0002mg-7n for qemu-devel@nongnu.org; Thu, 08 Oct 2009 14:49:27 -0400 Received: from mx1.redhat.com ([209.132.183.28]:28603) by monty-python.gnu.org with esmtp (Exim 4.60) (envelope-from ) id 1Mvy3K-0004NV-KR for qemu-devel@nongnu.org; Thu, 08 Oct 2009 14:49:26 -0400 Subject: Re: [Qemu-devel] [PATCH] qcow2: Bring synchronous read/write back to life From: Mark McLoughlin In-Reply-To: <4ACDFEB9.6090403@codemonkey.ws> References: <1255006928-7600-1-git-send-email-kwolf@redhat.com> <4ACDF797.4010805@codemonkey.ws> <4ACDFB64.1040106@redhat.com> <4ACDFEB9.6090403@codemonkey.ws> Content-Type: text/plain Date: Thu, 08 Oct 2009 19:47:44 +0100 Message-Id: <1255027664.8069.30.camel@blaa> Mime-Version: 1.0 Content-Transfer-Encoding: 7bit Reply-To: Mark McLoughlin List-Id: qemu-devel.nongnu.org List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Anthony Liguori Cc: Kevin Wolf , qemu-devel@nongnu.org On Thu, 2009-10-08 at 10:01 -0500, Anthony Liguori wrote: > Kevin Wolf wrote: > > Am 08.10.2009 16:30, schrieb Anthony Liguori: > > > >> Kevin Wolf wrote: > >> > >>> When the synchronous read and write functions were dropped, they were replaced > >>> by generic emulation functions. Unfortunately, these emulation functions don't > >>> provide the same semantics as the original functions did. > >>> > >>> The original bdrv_read would mean that we read some data synchronously and that > >>> we won't be interrupted during this read. The latter assumption is no longer > >>> true with the emulation function which needs to use qemu_aio_poll and therefore > >>> allows the callback of any other concurrent AIO request to be run during the > >>> read. > >>> > >> Perhaps you could create a mechanism to freeze the qcow2 image by > >> queuing all completions within qcow2 until the image was unfrozen. This > >> would have the same effect switching to synchronous read/write. > >> > >> You may also have to queue new read/write requests... > >> > >> Introducing sync read/write seems like a major step backwards to me. > >> > > > > Right, I was expecting your reaction. ;-) I do even agree that it's not > > nice to have the synchronous functions back. But removing them caused a > > regression, so the removal should be reverted until it is done right. > > > > I just want to make clear that we're talking about data corruption here. > > This is not just something that we can care about when we are bored some > > time in the future. > > > > Yeah, okay. Can we do a more direct revert though so that it's clearer > in the commit log? FWIW, here's the Fedora 12 (qemu-kvm-0.11.0) report on this: https://bugzilla.redhat.com/524734 Cheers, Mark.