Source
52
52
/*
53
53
* default attribute cache timeout (jiffies)
54
54
*/
55
55
#define CIFS_DEF_ACTIMEO (1 * HZ)
56
56
57
57
/*
58
58
* max attribute cache timeout (jiffies) - 2^30
59
59
*/
60
60
#define CIFS_MAX_ACTIMEO (1 << 30)
61
61
62
+
/*
63
+
* Max persistent and resilient handle timeout (milliseconds).
64
+
* Windows durable max was 960000 (16 minutes)
65
+
*/
66
+
#define SMB3_MAX_HANDLE_TIMEOUT 960000
67
+
62
68
/*
63
69
* MAX_REQ is the maximum number of requests that WE will send
64
70
* on one socket concurrently.
65
71
*/
66
72
#define CIFS_MAX_REQ 32767
67
73
68
74
#define RFC1001_NAME_LEN 15
69
75
#define RFC1001_NAME_LEN_WITH_NULL (RFC1001_NAME_LEN + 1)
70
76
71
77
/* maximum length of ip addr as a string (including ipv6 and sctp) */
579
585
bool sockopt_tcp_nodelay:1;
580
586
unsigned long actimeo; /* attribute cache timeout (jiffies) */
581
587
struct smb_version_operations *ops;
582
588
struct smb_version_values *vals;
583
589
char *prepath;
584
590
struct sockaddr_storage dstaddr; /* destination address */
585
591
struct sockaddr_storage srcaddr; /* allow binding to a local IP */
586
592
struct nls_table *local_nls;
587
593
unsigned int echo_interval; /* echo interval in secs */
588
594
__u64 snapshot_time; /* needed for timewarp tokens */
595
+
__u32 handle_timeout; /* persistent and durable handle timeout in ms */
589
596
unsigned int max_credits; /* smb3 max_credits 10 < credits < 60000 */
590
597
};
591
598
592
599
#define CIFS_MOUNT_MASK (CIFS_MOUNT_NO_PERM | CIFS_MOUNT_SET_UID | \
593
600
CIFS_MOUNT_SERVER_INUM | CIFS_MOUNT_DIRECT_IO | \
594
601
CIFS_MOUNT_NO_XATTR | CIFS_MOUNT_MAP_SPECIAL_CHR | \
595
602
CIFS_MOUNT_MAP_SFM_CHR | \
596
603
CIFS_MOUNT_UNX_EMUL | CIFS_MOUNT_NO_BRL | \
597
604
CIFS_MOUNT_CIFS_ACL | CIFS_MOUNT_OVERR_UID | \
598
605
CIFS_MOUNT_OVERR_GID | CIFS_MOUNT_DYNPERM | \
1051
1058
bool need_reconnect:1; /* connection reset, tid now invalid */
1052
1059
bool need_reopen_files:1; /* need to reopen tcon file handles */
1053
1060
bool use_resilient:1; /* use resilient instead of durable handles */
1054
1061
bool use_persistent:1; /* use persistent instead of durable handles */
1055
1062
__le32 capabilities;
1056
1063
__u32 share_flags;
1057
1064
__u32 maximal_access;
1058
1065
__u32 vol_serial_number;
1059
1066
__le64 vol_create_time;
1060
1067
__u64 snapshot_time; /* for timewarp tokens - timestamp of snapshot */
1068
+
__u32 handle_timeout; /* persistent and durable handle timeout in ms */
1061
1069
__u32 ss_flags; /* sector size flags */
1062
1070
__u32 perf_sector_size; /* best sector size for perf */
1063
1071
__u32 max_chunks;
1064
1072
__u32 max_bytes_chunk;
1065
1073
__u32 max_bytes_copy;
1066
1074
#ifdef CONFIG_CIFS_FSCACHE
1067
1075
u64 resource_id; /* server resource id */
1068
1076
struct fscache_cookie *fscache; /* cookie for share */
1069
1077
#endif
1070
1078
struct list_head pending_opens; /* list of incomplete opens */