[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Qemu-devel] [PATCH] xen_disk: support cache backend option
From: |
Paolo Bonzini |
Subject: |
Re: [Qemu-devel] [PATCH] xen_disk: support cache backend option |
Date: |
Wed, 26 Jun 2013 22:53:32 +0200 |
User-agent: |
Mozilla/5.0 (X11; Linux x86_64; rv:17.0) Gecko/20130514 Thunderbird/17.0.6 |
Il 26/06/2013 19:48, Stefano Stabellini ha scritto:
> + if (!strcmp(blkdev->cache, "none")) {
> + qflags = BDRV_O_NATIVE_AIO | BDRV_O_NOCACHE;
> + } else if (!strcmp(blkdev->cache, "writethrough")) {
> + qflags = 0;
> + } else {
> + /* default to writeback */
> + qflags = BDRV_O_NATIVE_AIO | BDRV_O_CACHE_WB;
> + }
You can use bdrv_parse_cache_flags. Note that BDRV_O_NATIVE_AIO
requires BDRV_O_NOCACHE too (but if you only specify BDRV_O_NATIVE_AIO
it's a no-op, not an error).
Paolo