[Samba] Effect of mount.cifs cache=loose on file writes
Mario Theodoridis
mario.theodoridis at regify.com
Mon Sep 26 13:01:27 UTC 2022
Hello everyone,
i'm in charge of maintaining a CentOS 7 system (3.10 kernel) which runs
an application that makes writes to a CIFS share. The nature of the data
is such that files and folders are created, eventually deleted, but
never modified. And there may be a second system accessing the data, but
most of the time these act as hot stand-by systems.
It was suggested to me to use cache=loose in the mount options in order
to enhance I/O performance.
After reading CACHE COHERENCY in MOUNT.CIFS(8), scanning for answers in
places like:
https://learn.microsoft.com/en-us/openspecs/windows_protocols/ms-cifs/d416ff7c-c536-406e-a951-4f04b2fd1d2b
and: http://www.ubiqx.org/cifs/index.html
as well as searching things like:
effect of cifs cache=loose on write flushing
i have not managed to find a definite answer to the question of whether
setting cache=loose has any effect on when a write is considered committed.
I must admit that i haven't given this question any thought before this
request came up, and always assumed that when a write comes back, it has
been safely written to disk on the other end.
While i realize that there may be additional factors, such as raid
controllers on the server, that come into play on this, i'm merely
interested in finding out whether
cache=loose
has negative effects on data consistency regarding file writes to a CIFS
share on the client/server level.
Or does it only affect detecting file changes as described in the man
page under CACHE COHERENCY.
I would appreciate any pointers in this regard, be it as an explanation,
or a link to docs where this is specified.
--
Mit Freundlichen Grüßen / Kind regards
Mario Theodoridis
regify GmbH
Römerstrasse 39 | D-78183 Hüfingen-Behla
Amtsgericht Freiburg HRB 709343
Telefon: +49 771 8978 4238
More information about the samba
mailing list