qemu-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Qemu-devel] [PATCH 1/1] block: add cache mode with direct IO and wi


From: Kevin Wolf
Subject: Re: [Qemu-devel] [PATCH 1/1] block: add cache mode with direct IO and without flushes
Date: Thu, 15 Sep 2016 18:09:07 +0200
User-agent: Mutt/1.5.21 (2010-09-15)

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 <address@hidden>
> CC: Kevin Wolf <address@hidden>
> CC: Max Reitz <address@hidden>

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
> 



reply via email to

[Prev in Thread] Current Thread [Next in Thread]