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 <[email protected]>
> CC: Kevin Wolf <[email protected]>
> CC: Max Reitz <[email protected]>
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
>