summaryrefslogtreecommitdiffstats
path: root/fs/cifs/cifsglob.h
diff options
context:
space:
mode:
authorPavel Shilovsky2012-09-19 15:22:44 +0200
committerSteve French2012-09-25 04:46:33 +0200
commitb8c32dbb0deb287a5fcb78251e4eae6c7275760d (patch)
treefa3cddfd4595846921f51a922b7e1722b1e35fa4 /fs/cifs/cifsglob.h
parentCIFS: Check for mandatory brlocks on read/write (diff)
downloadkernel-qcow2-linux-b8c32dbb0deb287a5fcb78251e4eae6c7275760d.tar.gz
kernel-qcow2-linux-b8c32dbb0deb287a5fcb78251e4eae6c7275760d.tar.xz
kernel-qcow2-linux-b8c32dbb0deb287a5fcb78251e4eae6c7275760d.zip
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 e2492e1cdb85..b6ec142028e8 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