From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([140.186.70.92]:48418) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1QD9ci-0002WB-QN for qemu-devel@nongnu.org; Fri, 22 Apr 2011 02:13:49 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1QD9ch-00051i-T4 for qemu-devel@nongnu.org; Fri, 22 Apr 2011 02:13:48 -0400 Received: from verein.lst.de ([213.95.11.211]:50107 helo=newverein.lst.de) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1QD9ch-00051b-M5 for qemu-devel@nongnu.org; Fri, 22 Apr 2011 02:13:47 -0400 Date: Fri, 22 Apr 2011 08:13:47 +0200 From: Christoph Hellwig Message-ID: <20110422061347.GA11066@lst.de> References: <4db09239.0b968e0a.4145.ffffada2@mx.google.com> <20110422040852.GA9493@lst.de> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: Subject: Re: [Qemu-devel] iSCSI support for QEMU, update List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: ronnie sahlberg Cc: kwolf@redhat.com, Christoph Hellwig , stefanha@linux.vnet.ibm.com, qemu-devel@nongnu.org On Fri, Apr 22, 2011 at 04:08:57PM +1000, ronnie sahlberg wrote: > So I should set FUA when > BDRV_O_CACHE_WB==0 or BDRV_O_NOCACHE==1 > right? At this point you need to set it if either the BDRV_O_CACHE_WB and BDRV_O_NOCACHE flags are set. And yes, the naming of the nocache flag is rather confusing. Take a look at block.c:bdrv_open_common(): /* * Yes, BDRV_O_NOCACHE aka O_DIRECT means we have to present a * write cache to the guest. We do need the fdatasync to flush * out transactions for block allocations, and we maybe have a * volatile write cache in our backing device to deal with. */ if (flags & (BDRV_O_CACHE_WB|BDRV_O_NOCACHE)) bs->enable_write_cache = 1;