summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorSteve French <stfrench@microsoft.com>2019-09-03 18:49:46 -0400
committerSteve French <stfrench@microsoft.com>2019-09-16 12:43:38 -0400
commitcae53f70f812c845fcedb577b0d40ec97ee4b920 (patch)
tree8ac4254f88973b488fdc6067275113d37c39c5f2
parent41e033fecdc891da629113c4f8ee80500b7656d6 (diff)
smb3: log warning if CSC policy conflicts with cache mount option
If the server config (e.g. Samba smb.conf "csc policy = disable) for the share indicates that the share should not be cached, log a warning message if forced client side caching ("cache=ro" or "cache=singleclient") is requested on mount. Signed-off-by: Steve French <stfrench@microsoft.com> Reviewed-by: Ronnie Sahlberg <lsahlber@redhat.com>
-rw-r--r--fs/cifs/connect.c8
1 files changed, 8 insertions, 0 deletions
diff --git a/fs/cifs/connect.c b/fs/cifs/connect.c
index d9a995588c74..85f8d943a05a 100644
--- a/fs/cifs/connect.c
+++ b/fs/cifs/connect.c
@@ -3478,6 +3478,14 @@ cifs_get_tcon(struct cifs_ses *ses, struct smb_vol *volume_info)
3478 tcon->use_resilient = true; 3478 tcon->use_resilient = true;
3479 } 3479 }
3480 3480
3481 /* If the user really knows what they are doing they can override */
3482 if (tcon->share_flags & SMB2_SHAREFLAG_NO_CACHING) {
3483 if (volume_info->cache_ro)
3484 cifs_dbg(VFS, "cache=ro requested on mount but NO_CACHING flag set on share\n");
3485 else if (volume_info->cache_rw)
3486 cifs_dbg(VFS, "cache=singleclient requested on mount but NO_CACHING flag set on share\n");
3487 }
3488
3481 /* 3489 /*
3482 * We can have only one retry value for a connection to a share so for 3490 * We can have only one retry value for a connection to a share so for
3483 * resources mounted more than once to the same server share the last 3491 * resources mounted more than once to the same server share the last