summaryrefslogtreecommitdiffstats
path: root/fs/cifs/cifsglob.h
diff options
context:
space:
mode:
authorPavel Shilovsky <pshilovsky@samba.org>2012-09-19 06:22:44 -0700
committerSteve French <smfrench@gmail.com>2012-09-24 21:46:33 -0500
commitb8c32dbb0deb287a5fcb78251e4eae6c7275760d (patch)
treefa3cddfd4595846921f51a922b7e1722b1e35fa4 /fs/cifs/cifsglob.h
parent579f9053236c796d718162c37c72bb3bd32d008c (diff)
downloadop-kernel-dev-b8c32dbb0deb287a5fcb78251e4eae6c7275760d.zip
op-kernel-dev-b8c32dbb0deb287a5fcb78251e4eae6c7275760d.tar.gz
CIFS: Request SMB2.1 leases
if server supports them and we need oplocks. Signed-off-by: Pavel Shilovsky <piastryyy@gmail.com> Signed-off-by: Steve French <sfrench@us.ibm.com>
Diffstat (limited to 'fs/cifs/cifsglob.h')
-rw-r--r--fs/cifs/cifsglob.h10
1 files changed, 10 insertions, 0 deletions
diff --git a/fs/cifs/cifsglob.h b/fs/cifs/cifsglob.h
index e2492e1..b6ec142 100644
--- a/fs/cifs/cifsglob.h
+++ b/fs/cifs/cifsglob.h
@@ -361,6 +361,12 @@ struct smb_version_operations {
const unsigned int);
/* push brlocks from the cache to the server */
int (*push_mand_locks)(struct cifsFileInfo *);
+ /* get lease key of the inode */
+ void (*get_lease_key)(struct inode *, struct cifs_fid *fid);
+ /* set lease key of the inode */
+ void (*set_lease_key)(struct inode *, struct cifs_fid *fid);
+ /* generate new lease key */
+ void (*new_lease_key)(struct cifs_fid *fid);
};
struct smb_version_values {
@@ -895,6 +901,7 @@ struct cifs_fid {
#ifdef CONFIG_CIFS_SMB2
__u64 persistent_fid; /* persist file id for smb2 */
__u64 volatile_fid; /* volatile file id for smb2 */
+ __u8 lease_key[SMB2_LEASE_KEY_SIZE]; /* lease key for smb2 */
#endif
};
@@ -1012,6 +1019,9 @@ struct cifsInodeInfo {
u64 server_eof; /* current file size on server -- protected by i_lock */
u64 uniqueid; /* server inode number */
u64 createtime; /* creation time on server */
+#ifdef CONFIG_CIFS_SMB2
+ __u8 lease_key[SMB2_LEASE_KEY_SIZE]; /* lease key for this inode */
+#endif
#ifdef CONFIG_CIFS_FSCACHE
struct fscache_cookie *fscache;
#endif
OpenPOWER on IntegriCloud