[pve-devel] Fwd: Re: recommanded cache setting for rbd image
Dietmar Maurer
dietmar at proxmox.com
Wed Nov 7 07:30:39 CET 2012
> > So maybe if we set cache=none and that guest doesn't support flushes
> > (drivers,kernel,?), it become writethrough in guest, so it's safe ?
I am looking at the source code now. Cache modes results in the following open flags:
cache=node ==> BDRV_O_NOCACHE | BDRV_O_CACHE_WB ==> O_DIRECT
cache=writeback ==>BDRV_O_CACHE_WB ==> no flags
So the only difference is that we open the file with O_DIRECT.
But O_DIRECT does not give you any safety (just tries to minimize cache effects).
So there is no real difference regarding safety.
The NOTES about O_DIRECT in "man 2 open" are not really useful.
More information about the pve-devel
mailing list