summaryrefslogtreecommitdiff
path: root/fs/cifs/cifsfs.c
diff options
context:
space:
mode:
authorSteve French <stfrench@microsoft.com>2019-08-28 07:58:54 +0300
committerSteve French <stfrench@microsoft.com>2019-09-16 19:43:37 +0300
commit83bbfa706dda668deb60e96df20327fc79e1716f (patch)
treed9682e25e2b3219df510e4f3002c105adf5f36f1 /fs/cifs/cifsfs.c
parentac6ad7a8c9f6f1fd43262b2273a45ec1fdd3a981 (diff)
downloadlinux-83bbfa706dda668deb60e96df20327fc79e1716f.tar.xz
smb3: add mount option to allow forced caching of read only share
If a share is immutable (at least for the period that it will be mounted) it would be helpful to not have to revalidate dentries repeatedly that we know can not be changed remotely. Add "cache=" option (cache=ro) for mounting read only shares in order to improve performance in cases in which we know that the share will not be changing while it is in use. Signed-off-by: Steve French <stfrench@microsoft.com>
Diffstat (limited to 'fs/cifs/cifsfs.c')
-rw-r--r--fs/cifs/cifsfs.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/fs/cifs/cifsfs.c b/fs/cifs/cifsfs.c
index 3289b566463f..970251bc0661 100644
--- a/fs/cifs/cifsfs.c
+++ b/fs/cifs/cifsfs.c
@@ -400,6 +400,8 @@ cifs_show_cache_flavor(struct seq_file *s, struct cifs_sb_info *cifs_sb)
seq_puts(s, "strict");
else if (cifs_sb->mnt_cifs_flags & CIFS_MOUNT_DIRECT_IO)
seq_puts(s, "none");
+ else if (cifs_sb->mnt_cifs_flags & CIFS_MOUNT_RO_CACHE)
+ seq_puts(s, "ro"); /* read only caching assumed */
else
seq_puts(s, "loose");
}