aboutsummaryrefslogtreecommitdiffstats
path: root/fs/cifs/connect.c
diff options
context:
space:
mode:
authorSteve French <stfrench@microsoft.com>2022-05-23 23:17:12 -0500
committerSteve French <stfrench@microsoft.com>2022-05-23 23:32:54 -0500
commit52832252dded19e291a7b8842542ea61d1765f2f (patch)
tree9a2ab14df21cbb17034aa627317abedd23b4109b /fs/cifs/connect.c
parentsmb3: don't set rc when used and unneeded in query_info_compound (diff)
downloadlinux-dev-52832252dded19e291a7b8842542ea61d1765f2f.tar.xz
linux-dev-52832252dded19e291a7b8842542ea61d1765f2f.zip
smb3: add mount parm nosparse
To reduce risk of applications breaking that mount to servers with only partial sparse file support, add optional mount parm "nosparse" which disables setting files sparse (and thus will return EOPNOTSUPP on certain fallocate operations). Acked-by: Ronnie Sahlberg <lsahlber@redhat.com> Signed-off-by: Steve French <stfrench@microsoft.com>
Diffstat (limited to 'fs/cifs/connect.c')
-rw-r--r--fs/cifs/connect.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/fs/cifs/connect.c b/fs/cifs/connect.c
index 0b08693d1af8..1fd8d6a97d7c 100644
--- a/fs/cifs/connect.c
+++ b/fs/cifs/connect.c
@@ -2509,6 +2509,7 @@ cifs_get_tcon(struct cifs_ses *ses, struct smb3_fs_context *ctx)
*/
tcon->retry = ctx->retry;
tcon->nocase = ctx->nocase;
+ tcon->broken_sparse_sup = ctx->no_sparse;
if (ses->server->capabilities & SMB2_GLOBAL_CAP_DIRECTORY_LEASING)
tcon->nohandlecache = ctx->nohandlecache;
else