From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1JqVS6-0000Hs-Hh for qemu-devel@nongnu.org; Mon, 28 Apr 2008 11:39:38 -0400 Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1JqVS5-0000HU-84 for qemu-devel@nongnu.org; Mon, 28 Apr 2008 11:39:38 -0400 Received: from [199.232.76.173] (port=58926 helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1JqVS5-0000HQ-0v for qemu-devel@nongnu.org; Mon, 28 Apr 2008 11:39:37 -0400 Received: from mx2.suse.de ([195.135.220.15]) by monty-python.gnu.org with esmtps (TLS-1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.60) (envelope-from ) id 1JqVS4-0002KT-VR for qemu-devel@nongnu.org; Mon, 28 Apr 2008 11:39:37 -0400 Received: from Relay1.suse.de (mail2.suse.de [195.135.221.8]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (No client certificate requested) by mx2.suse.de (Postfix) with ESMTP id 4434E45E0E for ; Mon, 28 Apr 2008 17:39:33 +0200 (CEST) Message-ID: <4815EE89.70407@suse.de> Date: Mon, 28 Apr 2008 17:34:33 +0200 From: Kevin Wolf MIME-Version: 1.0 Subject: Re: [Qemu-devel] [PATCH] Align file accesses with cache=off (O_DIRECT) References: <4807514B.9040607@suse.de> In-Reply-To: <4807514B.9040607@suse.de> Content-Type: text/plain; charset=ISO-8859-15 Content-Transfer-Encoding: 7bit Reply-To: qemu-devel@nongnu.org List-Id: qemu-devel.nongnu.org List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: qemu-devel@nongnu.org Kevin Wolf schrieb: > In December a patch was applied which introduced the cache=off option to > -drive. When using this option files are opened with the O_DIRECT flag. > This means that all accesses have to be aligned. The patch made a couple > of changes in this respect, still in other places they are missing (e.g. > you can't use cache=off with qcow(2) files). > > This patch implements wrappers for raw_pread and raw_pwrite which align > all file accesses and make qcow(2) work with cache=off. This method > might not be the most performant one (compared to fixing qcow, qcow2 and > everything else that might be using unaligned accesses), but unaligned > accesses don't happen that frequently and with this patch really all > image accesses should be covered. > > Signed-off-by: Kevin Wolf Anything wrong with this one? Kevin