From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([208.118.235.92]:48412) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1TCEau-0000gd-Nm for qemu-devel@nongnu.org; Thu, 13 Sep 2012 14:56:57 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1TCEas-00015k-Vb for qemu-devel@nongnu.org; Thu, 13 Sep 2012 14:56:56 -0400 Received: from mail-wi0-f181.google.com ([209.85.212.181]:61334) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1TCEas-00015d-P6 for qemu-devel@nongnu.org; Thu, 13 Sep 2012 14:56:54 -0400 Received: by wibhm2 with SMTP id hm2so2935514wib.10 for ; Thu, 13 Sep 2012 11:56:53 -0700 (PDT) Sender: Paolo Bonzini Message-ID: <50522C73.5030100@redhat.com> Date: Thu, 13 Sep 2012 20:56:51 +0200 From: Paolo Bonzini MIME-Version: 1.0 References: <01df3140216ac0398bfb3a295c553c42cdf31e5b.1347548248.git.jcody@redhat.com> <5052060A.5010304@redhat.com> <50521531.6010308@redhat.com> In-Reply-To: <50521531.6010308@redhat.com> Content-Type: text/plain; charset=ISO-8859-15 Content-Transfer-Encoding: 7bit Subject: Re: [Qemu-devel] [PATCH v2 06/16] block: do not parse BDRV_O_CACHE_WB in raw block drivers List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: jcody@redhat.com Cc: kwolf@redhat.com, supriyak@linux.vnet.ibm.com, eblake@redhat.com, qemu-devel@nongnu.org, stefanha@gmail.com Il 13/09/2012 19:17, Jeff Cody ha scritto: >> > >> > Why does this matter? If raw-posix was opened directly (i.e. without >> > the bs->file indirection) this would cause a writethrough file to be >> > incorrectly opened as writeback. >> > >> > Paolo >> > > The problem this patch was trying to work around is that > bdrv_open_common() forces BDRV_O_CACHE_WB (commit e1e9b0ac), but that > setting is not preserved in bs->open_flags, so it is lost on a reopen. Perhaps we _should_ preserve that in bs->open_flags, while still using the initial value of BDRV_O_CACHE_WB to initialize bs->enable_write_cache. > Is there a scenario currently that has raw-posix opened directly as a > writethrough file, or were you more concerned with future use? Not for raw-posix, but IIRC some other protocol is opened directly without a format on top. rbd perhaps? I'm concerned of having to work around what seems like a bug elsewhere, in multiple protocols. Paolo