From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1Mvuv1-0003X8-ER for qemu-devel@nongnu.org; Thu, 08 Oct 2009 11:28:39 -0400 Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1Mvuuw-0003QW-KQ for qemu-devel@nongnu.org; Thu, 08 Oct 2009 11:28:38 -0400 Received: from [199.232.76.173] (port=57545 helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1Mvuuw-0003QC-Bu for qemu-devel@nongnu.org; Thu, 08 Oct 2009 11:28:34 -0400 Received: from mail2.shareable.org ([80.68.89.115]:57504) by monty-python.gnu.org with esmtps (TLS-1.0:RSA_AES_256_CBC_SHA1:32) (Exim 4.60) (envelope-from ) id 1Mvuuv-0004E3-SH for qemu-devel@nongnu.org; Thu, 08 Oct 2009 11:28:34 -0400 Date: Thu, 8 Oct 2009 16:28:31 +0100 From: Jamie Lokier Subject: Re: [Qemu-devel] [PATCH] qcow2: Bring synchronous read/write back to life Message-ID: <20091008152831.GC29691@shareable.org> References: <1255006928-7600-1-git-send-email-kwolf@redhat.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <1255006928-7600-1-git-send-email-kwolf@redhat.com> List-Id: qemu-devel.nongnu.org List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Kevin Wolf Cc: qemu-devel@nongnu.org Kevin Wolf wrote: > 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. Which > in turn means that (meta)data read earlier could have changed and be > invalid now. I'm not sure if I understand your description, specifically "(meta)data read earlier could have changed and be invalid now". Do you mean: Async call into qcow2 #2 ------------------------ issues a request with bdrv_read/write Async call into qcow2 #1 ------------------------ reads some metadata from memory (**) does some calculations issues a request with bdrv_read/write the request completes updates some metadata in memory async call finished with result the request completes updates some metadata in memory .... ERROR, memory isn't what it was at point (**) Thanks, -- Jamie