From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([140.186.70.92]:38754) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1RIGnO-0000TW-BC for qemu-devel@nongnu.org; Mon, 24 Oct 2011 05:26:15 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1RIGnN-000891-EA for qemu-devel@nongnu.org; Mon, 24 Oct 2011 05:26:14 -0400 Received: from mail-wy0-f173.google.com ([74.125.82.173]:45089) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1RIGnN-00088p-7Y for qemu-devel@nongnu.org; Mon, 24 Oct 2011 05:26:13 -0400 Received: by wyh15 with SMTP id 15so6748164wyh.4 for ; Mon, 24 Oct 2011 02:26:12 -0700 (PDT) Sender: Paolo Bonzini Message-ID: <4EA52F2E.4000302@redhat.com> Date: Mon, 24 Oct 2011 11:26:06 +0200 From: Paolo Bonzini MIME-Version: 1.0 References: <1319216912-26964-1-git-send-email-kwolf@redhat.com> <4EA1BD95.8030205@redhat.com> <4EA515B9.8070204@redhat.com> <4EA51963.5060904@redhat.com> <4EA51F16.3030700@redhat.com> <4EA5262D.7090901@redhat.com> <4EA527DC.90902@redhat.com> In-Reply-To: <4EA527DC.90902@redhat.com> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Subject: Re: [Qemu-devel] [PATCH 0/2] block: Write out internal caches even with cache=unsafe List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Kevin Wolf Cc: avi@redhat.com, Alexander Graf , qemu-devel@nongnu.org On 10/24/2011 10:54 AM, Kevin Wolf wrote: > > I don't know... checking BDRV_O_NO_FLUSH in the drivers rather than in > > the generic code sounds like a layering violation. Perhaps what you're > > after is a separation of bdrv_co_flush from bdrv_{,co_,aio_}fsync? Then > > BDRV_O_NO_FLUSH (better renamed to BDRV_O_NO_FSYNC...) would only > > inhibit the latter. > > Why? All other cache related BDRV_O_* flags are interpreted by the block > drivers, so why should BDRV_O_NO_FLUSH be special? You're changing the API and asking for possibly non-trivial changes in all protocol drivers, in order to accomodate semantics that all format drivers potentially could desire. So I wonder if the problem is simply that the current API is not expressive enough. Paolo