diff options
author | Pavel Shilovsky <pshilovsky@samba.org> | 2013-07-09 10:40:58 -0400 |
---|---|---|
committer | Steve French <smfrench@gmail.com> | 2013-07-10 14:08:40 -0400 |
commit | 9cbc0b7339b0542a1d13922d2745a2636ce44853 (patch) | |
tree | af06d88f00880c95d35c584338fbdebf1112843e /fs/cifs/smb2file.c | |
parent | 064f6047a123d61dd52bb44605c999cd8ef727d9 (diff) |
CIFS: Reconnect durable handles for SMB2
On reconnects, we need to reopen file and then obtain all byte-range
locks held by the client. SMB2 protocol provides feature to make
this process atomic by reconnecting to the same file handle
with all it's byte-range locks. This patch adds this capability
for SMB2 shares.
Signed-off-by: Pavel Shilovsky <pshilovsky@samba.org>
Signed-off-by: Steven French <steven@steven-GA-970A-DS3.(none)>
Diffstat (limited to 'fs/cifs/smb2file.c')
-rw-r--r-- | fs/cifs/smb2file.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/fs/cifs/smb2file.c b/fs/cifs/smb2file.c index 398992962cc6..04a81a4142c3 100644 --- a/fs/cifs/smb2file.c +++ b/fs/cifs/smb2file.c | |||
@@ -40,7 +40,8 @@ smb2_set_oplock_level(struct cifsInodeInfo *cinode, __u32 oplock) | |||
40 | oplock &= 0xFF; | 40 | oplock &= 0xFF; |
41 | if (oplock == SMB2_OPLOCK_LEVEL_NOCHANGE) | 41 | if (oplock == SMB2_OPLOCK_LEVEL_NOCHANGE) |
42 | return; | 42 | return; |
43 | if (oplock == SMB2_OPLOCK_LEVEL_EXCLUSIVE) { | 43 | if (oplock == SMB2_OPLOCK_LEVEL_EXCLUSIVE || |
44 | oplock == SMB2_OPLOCK_LEVEL_BATCH) { | ||
44 | cinode->clientCanCacheAll = true; | 45 | cinode->clientCanCacheAll = true; |
45 | cinode->clientCanCacheRead = true; | 46 | cinode->clientCanCacheRead = true; |
46 | cifs_dbg(FYI, "Exclusive Oplock granted on inode %p\n", | 47 | cifs_dbg(FYI, "Exclusive Oplock granted on inode %p\n", |