summaryrefslogtreecommitdiff
path: root/fs/cifs/cifs_fs_sb.h
diff options
context:
space:
mode:
authorSteve French <stfrench@microsoft.com>2019-02-28 21:32:15 -0600
committerSteve French <stfrench@microsoft.com>2019-03-04 20:05:35 -0600
commite8506d25f740fd058791cc12a6dfa9386ada6b96 (patch)
treead1a9042ca3ded218d907a8b67866a771e39c3f0 /fs/cifs/cifs_fs_sb.h
parent7b9b9edb49ad377b1e06abf14354c227e9ac4b06 (diff)
smb3: make default i/o size for smb3 mounts larger
We negotiate rsize mounts (and it can be overridden by user) to typically 4MB, so using larger default I/O sizes from userspace (changing to 1MB default i/o size returned by stat) the performance is much better (and not just for long latency network connections) in most use cases for SMB3 than the default I/O size (which ends up being 128K for cp and can be even smaller for cp). This can be 4x slower or worse depending on network latency. By changing inode->blocksize from 32K (which was perhaps ok for very old SMB1/CIFS) to a larger value, 1MB (but still less than max size negotiated with the server which is 4MB, in order to minimize risk) it significantly increases performance for the noncached case, and slightly increases it for the cached case. This can be changed by the user on mount (specifying bsize= values from 16K to 16MB) to tune better for performance for applications that depend on blocksize. Signed-off-by: Steve French <stfrench@microsoft.com> Reviewed-by: Ronnie Sahlberg <lsahlber@redhat.com> CC: Stable <stable@vger.kernel.org>
Diffstat (limited to 'fs/cifs/cifs_fs_sb.h')
-rw-r--r--fs/cifs/cifs_fs_sb.h1
1 files changed, 1 insertions, 0 deletions
diff --git a/fs/cifs/cifs_fs_sb.h b/fs/cifs/cifs_fs_sb.h
index 42f0d67f1054..ed49222abecb 100644
--- a/fs/cifs/cifs_fs_sb.h
+++ b/fs/cifs/cifs_fs_sb.h
@@ -58,6 +58,7 @@ struct cifs_sb_info {
spinlock_t tlink_tree_lock;
struct tcon_link *master_tlink;
struct nls_table *local_nls;
+ unsigned int bsize;
unsigned int rsize;
unsigned int wsize;
unsigned long actimeo; /* attribute cache timeout (jiffies) */