From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([208.118.235.92]:51193) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1TsRxU-0002es-Ni for qemu-devel@nongnu.org; Tue, 08 Jan 2013 00:42:46 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1TsRxT-0000FL-Ot for qemu-devel@nongnu.org; Tue, 08 Jan 2013 00:42:44 -0500 Received: from mail-da0-f51.google.com ([209.85.210.51]:33284) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1TsRxT-0000F6-D5 for qemu-devel@nongnu.org; Tue, 08 Jan 2013 00:42:43 -0500 Received: by mail-da0-f51.google.com with SMTP id i30so16800dad.10 for ; Mon, 07 Jan 2013 21:42:42 -0800 (PST) Message-ID: <50EBB1CB.9030608@gmail.com> Date: Tue, 08 Jan 2013 13:42:35 +0800 From: Liu Yuan MIME-Version: 1.0 References: <1355941771-3418-1-git-send-email-namei.unix@gmail.com> <87k3s6shdv.wl%morita.kazutaka@lab.ntt.co.jp> <50D967C3.7020109@gmail.com> <50E58B19.2050701@gmail.com> <20130104163830.GF6310@stefanha-thinkpad.hitronhub.home> <50E7AEC4.5080309@gmail.com> <50E7BA41.3020307@gmail.com> <50E7DC9B.4080309@gmail.com> <50EACC61.2020603@redhat.com> In-Reply-To: <50EACC61.2020603@redhat.com> Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit Subject: Re: [Qemu-devel] [PATCH] sheepdog: implement direct write semantics List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Kevin Wolf Cc: Stefan Hajnoczi , qemu-devel@nongnu.org, MORITA Kazutaka , Paolo Bonzini On 01/07/2013 09:23 PM, Kevin Wolf wrote: > No, and in theory they shouldn't have to care. > > Why do you want to handle writethrough semantics in the block driver > rather than letting qemu care for sending the right flushes? Because Sheepdog itself provide the client side cache implementation and we need means to get the cache hint from users when starting up the VM. This cache support: writethrough: provide a read cache for this VM, which is always consistent with cluster data writeback: provide a writeback cache for this VM, which only flush the dirty bits when VM send 'flush' request. directio: disable cache completely for this VM. Old QEMU (before v1.2) allows block drivers to get the cache flags, so Sheepdog can interpret these flags on its own to choose the right cache mode for each VM. doesn't QEMU need keep backward compatibility? Thanks, Yuan