diff options
author | Steve French <stfrench@microsoft.com> | 2022-05-23 23:17:12 -0500 |
---|---|---|
committer | Steve French <stfrench@microsoft.com> | 2022-05-23 23:32:54 -0500 |
commit | 52832252dded19e291a7b8842542ea61d1765f2f (patch) | |
tree | 9a2ab14df21cbb17034aa627317abedd23b4109b /fs/cifs/fs_context.c | |
parent | 9ccfc23a72b669678e4c9ccba98d3d91db1c04cf (diff) | |
download | linux-stable-52832252dded19e291a7b8842542ea61d1765f2f.tar.gz linux-stable-52832252dded19e291a7b8842542ea61d1765f2f.tar.bz2 linux-stable-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/fs_context.c')
-rw-r--r-- | fs/cifs/fs_context.c | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/fs/cifs/fs_context.c b/fs/cifs/fs_context.c index a92e9eec521f..ca1d6957a099 100644 --- a/fs/cifs/fs_context.c +++ b/fs/cifs/fs_context.c @@ -119,6 +119,7 @@ const struct fs_parameter_spec smb3_fs_parameters[] = { fsparam_flag_no("persistenthandles", Opt_persistent), fsparam_flag_no("resilienthandles", Opt_resilient), fsparam_flag_no("tcpnodelay", Opt_tcp_nodelay), + fsparam_flag("nosparse", Opt_nosparse), fsparam_flag("domainauto", Opt_domainauto), fsparam_flag("rdma", Opt_rdma), fsparam_flag("modesid", Opt_modesid), @@ -943,6 +944,9 @@ static int smb3_fs_context_parse_param(struct fs_context *fc, case Opt_nolease: ctx->no_lease = 1; break; + case Opt_nosparse: + ctx->no_sparse = 1; + break; case Opt_nodelete: ctx->nodelete = 1; break; |