aboutsummaryrefslogtreecommitdiffstats
path: root/fs/cifs/smb2pdu.h
diff options
context:
space:
mode:
authorPavel Shilovsky <pshilov@microsoft.com>2019-10-29 16:51:19 -0700
committerSteve French <stfrench@microsoft.com>2019-11-25 01:17:12 -0600
commit9bd4540836684013aaad6070a65d6fcdd9006625 (patch)
tree93f7efa7ff635683f5120f961cde3b852fc27f42 /fs/cifs/smb2pdu.h
parentcifs: move cifsFileInfo_put logic into a work-queue (diff)
downloadlinux-dev-9bd4540836684013aaad6070a65d6fcdd9006625.tar.xz
linux-dev-9bd4540836684013aaad6070a65d6fcdd9006625.zip
CIFS: Properly process SMB3 lease breaks
Currenly we doesn't assume that a server may break a lease from RWH to RW which causes us setting a wrong lease state on a file and thus mistakenly flushing data and byte-range locks and purging cached data on the client. This leads to performance degradation because subsequent IOs go directly to the server. Fix this by propagating new lease state and epoch values to the oplock break handler through cifsFileInfo structure and removing the use of cifsInodeInfo flags for that. It allows to avoid some races of several lease/oplock breaks using those flags in parallel. Signed-off-by: Pavel Shilovsky <pshilov@microsoft.com> Signed-off-by: Steve French <stfrench@microsoft.com>
Diffstat (limited to 'fs/cifs/smb2pdu.h')
-rw-r--r--fs/cifs/smb2pdu.h2
1 files changed, 1 insertions, 1 deletions
diff --git a/fs/cifs/smb2pdu.h b/fs/cifs/smb2pdu.h
index 0abfde6d0b05..f264e1d36fe1 100644
--- a/fs/cifs/smb2pdu.h
+++ b/fs/cifs/smb2pdu.h
@@ -1386,7 +1386,7 @@ struct smb2_oplock_break {
struct smb2_lease_break {
struct smb2_sync_hdr sync_hdr;
__le16 StructureSize; /* Must be 44 */
- __le16 Reserved;
+ __le16 Epoch;
__le32 Flags;
__u8 LeaseKey[16];
__le32 CurrentLeaseState;