Received: from eggs.gnu.org ([2001:4830:134:3::10]:49473) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1bkZDz-00022F-6M for qemu-devel@nongnu.org; Thu, 15 Sep 2016 12:09:22 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1bkZDw-0004Cf-9z for qemu-devel@nongnu.org; Thu, 15 Sep 2016 12:09:18 -0400 Date: Thu, 15 Sep 2016 18:09:07 +0200 From: Kevin Wolf Message-ID: <20160915160907.GO4726@noname.redhat.com> References: <1473945592-12809-1-git-send-email-den@openvz.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <1473945592-12809-1-git-send-email-den@openvz.org> Subject: Re: [Qemu-devel] [PATCH 1/1] block: add cache mode with direct IO and without flushes List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: "Denis V. Lunev" Cc: qemu-block@nongnu.org, qemu-devel@nongnu.org, Max Reitz Am 15.09.2016 um 15:19 hat Denis V. Lunev geschrieben: > This mode could be very useful for flush bottlenecks evaluation and for > running non-persistent VMs, when host crash is considered not fatal. > > Signed-off-by: Denis V. Lunev > CC: Kevin Wolf > CC: Max Reitz Why not just specify the individual options? -drive file=...,cache.direct=on,cache.no-flush=on Kevin > block.c | 3 +++ > 1 file changed, 3 insertions(+) > > diff --git a/block.c b/block.c > index 30d64e6..877165c 100644 > --- a/block.c > +++ b/block.c > @@ -641,6 +641,9 @@ int bdrv_parse_cache_mode(const char *mode, int *flags, bool *writethrough) > if (!strcmp(mode, "off") || !strcmp(mode, "none")) { > *writethrough = false; > *flags |= BDRV_O_NOCACHE; > + } else if (!strcmp(mode, "none-unsafe") || !strcmp(mode, "off-unsafe")) { > + *writethrough = false; > + *flags |= BDRV_O_NOCACHE | BDRV_O_NO_FLUSH; > } else if (!strcmp(mode, "directsync")) { > *writethrough = true; > *flags |= BDRV_O_NOCACHE; > -- > 2.5.0 >