From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([208.118.235.92]:56887) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1TCQkE-0000fK-8V for qemu-devel@nongnu.org; Fri, 14 Sep 2012 03:55:25 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1TCQkD-0008Pd-8y for qemu-devel@nongnu.org; Fri, 14 Sep 2012 03:55:22 -0400 Received: from mx1.redhat.com ([209.132.183.28]:40061) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1TCQkD-0008PB-0A for qemu-devel@nongnu.org; Fri, 14 Sep 2012 03:55:21 -0400 Message-ID: <5052E2E2.5040307@redhat.com> Date: Fri, 14 Sep 2012 09:55:14 +0200 From: Kevin Wolf MIME-Version: 1.0 References: <01df3140216ac0398bfb3a295c553c42cdf31e5b.1347548248.git.jcody@redhat.com> <5052060A.5010304@redhat.com> <5052DC5C.4080907@redhat.com> <5052E1B2.2080304@redhat.com> In-Reply-To: <5052E1B2.2080304@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: Paolo Bonzini Cc: supriyak@linux.vnet.ibm.com, Jeff Cody , eblake@redhat.com, qemu-devel@nongnu.org, stefanha@gmail.com Am 14.09.2012 09:50, schrieb Paolo Bonzini: > Il 14/09/2012 09:27, Kevin Wolf ha scritto: >> I can't see how bs->file is needed here for writethrough semantics. >> bdrv_open_common() sets bs->enable_write_cache to false and >> bdrv_co_do_writev() checks it and flushes if necessary. Looks fine to me. > > You're right. > >> In fact, bdrv_open_common() even removes BDRV_O_CACHE_WB, so what Jeff >> removes here is really dead code (checked with strace: The file isn't >> opened with O_SYNC even when using -drive format=file). > > Yes, it's dead, on the other hand we still honor BDRV_O_CACHE_WB in all > the other protocols. Either we go and touch all the protocols > (effectively removing BDRV_O_CACHE_WB from the BlockDriver > specification), or treating raw-{posix,win32} specially means we leave > bugs everywhere else. Yes, touch all protocols and fix them. BDRV_O_CACHE_WB should be for block.c only. Kevin