|
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] Re: [Xen-devel] [PATCH] xen_disk: support cache backend option
On Wed, 26 Jun 2013, Paolo Bonzini wrote:
> 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.
I didn't want to call to bdrv_parse_cache_flags because the options are
slightly different (they are a subset) and they are going to become
part of the block interface, so the parsing could diverge in the future.
However as of today I could call bdrv_parse_cache_flags and it would
work fine.
> 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).
Yeah, good point, I might as well remove it from there.
_______________________________________________
Xen-devel mailing list
Xen-devel@xxxxxxxxxxxxx
http://lists.xen.org/xen-devel
|
![]() |
Lists.xenproject.org is hosted with RackSpace, monitoring our |