From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([208.118.235.92]:34297) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1SlLT0-00010r-LI for qemu-devel@nongnu.org; Sun, 01 Jul 2012 10:49:39 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1SlLSz-0006go-1s for qemu-devel@nongnu.org; Sun, 01 Jul 2012 10:49:38 -0400 Received: from mx1.redhat.com ([209.132.183.28]:4881) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1SlLSy-0006gd-Pp for qemu-devel@nongnu.org; Sun, 01 Jul 2012 10:49:36 -0400 Message-ID: <4FF06379.9030808@redhat.com> Date: Sun, 01 Jul 2012 16:49:29 +0200 From: Paolo Bonzini MIME-Version: 1.0 References: <20120611141806.GA2737@in.ibm.com> <20120611142144.GD2737@in.ibm.com> In-Reply-To: Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit Subject: Re: [Qemu-devel] [RFC PATCH 3/3] block: gluster as block backend List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Stefan Hajnoczi Cc: Kevin Wolf , Vijay Bellur , Amar Tumballi , qemu-devel@nongnu.org, bharata@linux.vnet.ibm.com Il 18/06/2012 19:35, Stefan Hajnoczi ha scritto: >> > + /* Use O_DSYNC for write-through caching, no flags for write-back caching, >> > + * and O_DIRECT for no caching. */ >> > + if ((bdrv_flags & BDRV_O_NOCACHE)) >> > + s->open_flags |= O_DIRECT; >> > + if (!(bdrv_flags & BDRV_O_CACHE_WB)) >> > + s->open_flags |= O_DSYNC; > Paolo has changed this recently, you might need to use > bs->enable_write_cache instead. At the protocol (i.e. low-level backend) level you don't need to do anything really, if you implement bdrv_flush_to_disk correctly. Looking at BDRV_O_CACHE_WB will do no harm, it's just dead code. Paolo