Il 18/12/2013 18:21, Peter Lieven ha scritto: > Not completely I think, but please correct me if I am wrong. > > If cache=writeback is set we issue just a write. In libnfs or libiscsi case > that guarantees that the request has been successfully executed > on the target / server. This is enough to be consistent in case of > migration because consecutive reads will be answered correctly. > > But the target / server is still free to just keep this > data in memory so we should only set this if we know that the target / server > e.g. has a battery backup or we know that the filesystem uses e.g. barriers > and > issues a flush at important points.
Yes. However, the same holds for cache=none (both on libnfs/libiscsi/NBD/others, where it is a nop, and on regular I/O, where it uses O_DIRECT *but not O_SYNC or O_DSYNC*). > If cache=none is set we issue a flush after every single write. That's what you get with cache=writethrough or cache=directsync. Here the flush is added automatically by the block layer, so it works with every driver. Paolo