From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from [140.186.70.92] (port=47853 helo=eggs.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1Q099B-0001h7-Cv for qemu-devel@nongnu.org; Thu, 17 Mar 2011 05:05:34 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1Q099A-00086g-0E for qemu-devel@nongnu.org; Thu, 17 Mar 2011 05:05:33 -0400 Received: from mx1.redhat.com ([209.132.183.28]:14119) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Q0999-00086D-It for qemu-devel@nongnu.org; Thu, 17 Mar 2011 05:05:31 -0400 Message-ID: <4D81CF57.9000300@redhat.com> Date: Thu, 17 Mar 2011 10:07:35 +0100 From: Kevin Wolf MIME-Version: 1.0 References: <20110315141049.GA30627@lst.de> <20110315141100.GA30710@lst.de> <20110316140844.GA21877@lst.de> In-Reply-To: Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit Subject: [Qemu-devel] Re: [PATCH 1/4] block: clarify the meaning of BDRV_O_NOCACHE List-Id: qemu-devel.nongnu.org List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Stefan Hajnoczi Cc: "prerna@linux.vnet.ibm.com Anthony Liguori" , Christoph Hellwig , qemu-devel@nongnu.org Am 16.03.2011 18:00, schrieb Stefan Hajnoczi: > On Wed, Mar 16, 2011 at 2:08 PM, Christoph Hellwig wrote: >> On Wed, Mar 16, 2011 at 09:42:37AM +0000, Stefan Hajnoczi wrote: >>> - writethrough = ((flags & BDRV_O_CACHE_MASK) == 0); >>> + writethrough = ((flags & (BDRV_O_CACHE_WB | BDRV_O_NO_FLUSH)) == 0); >> >> or rather >> >> writethrough = ((flags & (BDRV_O_CACHE_WB) != ); >> >> but yes, this code had sneaked in since my initial version. > > My intention was that if we don't care about honoring flushes then we > might as well use Qcow2Cache. But yes, just checking for cache mode > is the clearest. You mean for a possible writethrough mode with BDRV_O_NO_FLUSH set? Such a mode doesn't make a lot of sense to me. Kevin