aboutsummaryrefslogtreecommitdiffstats
path: root/fs/cifs
diff options
context:
space:
mode:
authorSteve French <stfrench@microsoft.com>2019-08-29 23:33:38 -0400
committerSteve French <stfrench@microsoft.com>2019-09-16 12:43:37 -0400
commit1981ebaabd88a9b3e550b6163c570a498c32a1f5 (patch)
treefac060a88a7ec38d9cebbcfd0919387d0b734110 /fs/cifs
parent83bbfa706dda668deb60e96df20327fc79e1716f (diff)
smb3: add some more descriptive messages about share when mounting cache=ro
Add some additional logging so the user can see if the share they mounted with cache=ro is considered read only by the server CIFS: Attempting to mount //localhost/test CIFS VFS: mounting share with read only caching. Ensure that the share will not be modified while in use. CIFS VFS: read only mount of RW share CIFS: Attempting to mount //localhost/test-ro CIFS VFS: mounting share with read only caching. Ensure that the share will not be modified while in use. CIFS VFS: mounted to read only share Signed-off-by: Steve French <stfrench@microsoft.com> Reviewed-by: Ronnie Sahlberg <lsahlber@redhat.com>
Diffstat (limited to 'fs/cifs')
-rw-r--r--fs/cifs/connect.c10
1 files changed, 9 insertions, 1 deletions
diff --git a/fs/cifs/connect.c b/fs/cifs/connect.c
index 4e622953dd5a..072c01f4e9c1 100644
--- a/fs/cifs/connect.c
+++ b/fs/cifs/connect.c
@@ -4197,8 +4197,16 @@ static int mount_get_conns(struct smb_vol *vol, struct cifs_sb_info *cifs_sb,
4197 tcon->unix_ext = 0; /* server does not support them */ 4197 tcon->unix_ext = 0; /* server does not support them */
4198 4198
4199 /* do not care if a following call succeed - informational */ 4199 /* do not care if a following call succeed - informational */
4200 if (!tcon->pipe && server->ops->qfs_tcon) 4200 if (!tcon->pipe && server->ops->qfs_tcon) {
4201 server->ops->qfs_tcon(*xid, tcon); 4201 server->ops->qfs_tcon(*xid, tcon);
4202 if (cifs_sb->mnt_cifs_flags & CIFS_MOUNT_RO_CACHE) {
4203 if (tcon->fsDevInfo.DeviceCharacteristics &
4204 FILE_READ_ONLY_DEVICE)
4205 cifs_dbg(VFS, "mounted to read only share\n");
4206 else
4207 cifs_dbg(VFS, "read only mount of RW share\n");
4208 }
4209 }
4202 4210
4203 cifs_sb->wsize = server->ops->negotiate_wsize(tcon, vol); 4211 cifs_sb->wsize = server->ops->negotiate_wsize(tcon, vol);
4204 cifs_sb->rsize = server->ops->negotiate_rsize(tcon, vol); 4212 cifs_sb->rsize = server->ops->negotiate_rsize(tcon, vol);