From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from [140.186.70.92] (port=52938 helo=eggs.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1Q5dat-0004Ck-Od for qemu-devel@nongnu.org; Fri, 01 Apr 2011 08:36:52 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1Q5das-0000je-P5 for qemu-devel@nongnu.org; Fri, 01 Apr 2011 08:36:51 -0400 Received: from e34.co.us.ibm.com ([32.97.110.152]:47530) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Q5das-0000j5-IK for qemu-devel@nongnu.org; Fri, 01 Apr 2011 08:36:50 -0400 Received: from d03relay04.boulder.ibm.com (d03relay04.boulder.ibm.com [9.17.195.106]) by e34.co.us.ibm.com (8.14.4/8.13.1) with ESMTP id p31COnJj010476 for ; Fri, 1 Apr 2011 06:24:49 -0600 Received: from d03av01.boulder.ibm.com (d03av01.boulder.ibm.com [9.17.195.167]) by d03relay04.boulder.ibm.com (8.13.8/8.13.8/NCO v10.0) with ESMTP id p31CaM4a052510 for ; Fri, 1 Apr 2011 06:36:31 -0600 Received: from d03av01.boulder.ibm.com (loopback [127.0.0.1]) by d03av01.boulder.ibm.com (8.14.4/8.13.1/NCO v10.0 AVout) with ESMTP id p31CaLOA021235 for ; Fri, 1 Apr 2011 06:36:21 -0600 Message-ID: <4D95C6C1.8070109@us.ibm.com> Date: Fri, 01 Apr 2011 07:36:17 -0500 From: Anthony Liguori MIME-Version: 1.0 Subject: Re: [Qemu-devel] [RFC PATCH] qed: add support for Copy-on-Read References: <1301533714-28997-1-git-send-email-aliguori@us.ibm.com> <4D95B2D0.2040702@redhat.com> In-Reply-To: <4D95B2D0.2040702@redhat.com> Content-Type: text/plain; charset=ISO-8859-15; format=flowed Content-Transfer-Encoding: 7bit List-Id: qemu-devel.nongnu.org List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Kevin Wolf Cc: qemu-devel@nongnu.org, Stefan Hajnoczi On 04/01/2011 06:11 AM, Kevin Wolf wrote: > Am 31.03.2011 03:08, schrieb Anthony Liguori: >> When creating an image using qemu-img, just pass '-o copy_on_read' and then >> whenever QED reads from a backing file, it will write the block to the QED >> file after the read completes ensuring that you only fetch from the backing >> device once. > As you probably know, I don't agree with the interface. Copy on read > should be first and foremost a runtime option. It's okay to fetch the > default for this option from the image file, but it's not the right > primary interface. That's the main reason I posted this. I wanted to revisit that discussion and see if we're any close to having a primary interface for this. I think blockdev is still a ways off. Would a -drive file=image.img,cor=on make sense as an intermediate mechanism? >> This is very useful for streaming images over a slow connection. >> >> This isn't ready for merge yet as it's not playing nice with synchronize I/O. > Like Stefan I'm not sure what you mean here. > > One problem that I see is that if you have a concurrent write request > from the guest, the COR write request may overwrite the guest's request, > which is obviously wrong. Is this what you mean? Yes, I think you're right here but I don't think this is the issue. But surely the semantics of a simultaneous read/write are undefined at least on the read side. I guess having the write be undefined is unexpected. Regards, Anthony Liguori > Kevin