]> git.baikalelectronics.ru Git - kernel.git/commit
smb3: fix redundant opens on root
authorSteve French <stfrench@microsoft.com>
Thu, 26 Apr 2018 03:19:09 +0000 (22:19 -0500)
committerSteve French <stfrench@microsoft.com>
Sun, 27 May 2018 22:56:35 +0000 (17:56 -0500)
commitb551adb1d85d2ea303d57935b851ee2a6ef4c9d9
tree78a482f5ff0df0a41853800285f0df1a197851c1
parent74ec999c188d9bcec39cb777ff04ecb2a2d6318b
smb3: fix redundant opens on root

In SMB2/SMB3 unlike in cifs we unnecessarily open the root of the share
over and over again in various places during mount and path revalidation
and also in statfs.  This patch cuts redundant traffic (opens and closes)
by simply keeping the directory handle for the root around (and reopening
it as needed on reconnect), so query calls don't require three round
trips to copmlete - just one, and eases load on network, client and
server (on mount alone, cuts network traffic by more than a third).

Also add a new cifs mount parm "nohandlecache" to allow users whose
servers might have resource constraints (eg in case they have a server
with so many users connecting to it that this extra handle per mount
could possibly be a resource concern).

Signed-off-by: Steve French <smfrench@gmail.com>
Reviewed-by: Ronnie Sahlberg <lsahlber@redhat.com>
fs/cifs/cifs_fs_sb.h
fs/cifs/cifsfs.c
fs/cifs/cifsglob.h
fs/cifs/cifssmb.c
fs/cifs/connect.c
fs/cifs/misc.c
fs/cifs/smb2inode.c
fs/cifs/smb2ops.c
fs/cifs/smb2proto.h