diff options
Diffstat (limited to 'fs/cifs/cifsglob.h')
-rw-r--r-- | fs/cifs/cifsglob.h | 43 |
1 files changed, 24 insertions, 19 deletions
diff --git a/fs/cifs/cifsglob.h b/fs/cifs/cifsglob.h index c791e5b5a914..f1ae1f57c30d 100644 --- a/fs/cifs/cifsglob.h +++ b/fs/cifs/cifsglob.h | |||
@@ -85,8 +85,7 @@ enum securityEnum { | |||
85 | }; | 85 | }; |
86 | 86 | ||
87 | enum protocolEnum { | 87 | enum protocolEnum { |
88 | IPV4 = 0, | 88 | TCP = 0, |
89 | IPV6, | ||
90 | SCTP | 89 | SCTP |
91 | /* Netbios frames protocol not supported at this time */ | 90 | /* Netbios frames protocol not supported at this time */ |
92 | }; | 91 | }; |
@@ -122,6 +121,9 @@ struct cifs_cred { | |||
122 | */ | 121 | */ |
123 | 122 | ||
124 | struct TCP_Server_Info { | 123 | struct TCP_Server_Info { |
124 | struct list_head tcp_ses_list; | ||
125 | struct list_head smb_ses_list; | ||
126 | int srv_count; /* reference counter */ | ||
125 | /* 15 character server name + 0x20 16th byte indicating type = srv */ | 127 | /* 15 character server name + 0x20 16th byte indicating type = srv */ |
126 | char server_RFC1001_name[SERVER_NAME_LEN_WITH_NULL]; | 128 | char server_RFC1001_name[SERVER_NAME_LEN_WITH_NULL]; |
127 | char unicode_server_Name[SERVER_NAME_LEN_WITH_NULL * 2]; | 129 | char unicode_server_Name[SERVER_NAME_LEN_WITH_NULL * 2]; |
@@ -141,7 +143,8 @@ struct TCP_Server_Info { | |||
141 | char versionMajor; | 143 | char versionMajor; |
142 | char versionMinor; | 144 | char versionMinor; |
143 | bool svlocal:1; /* local server or remote */ | 145 | bool svlocal:1; /* local server or remote */ |
144 | atomic_t socketUseCount; /* number of open cifs sessions on socket */ | 146 | bool noblocksnd; /* use blocking sendmsg */ |
147 | bool noautotune; /* do not autotune send buf sizes */ | ||
145 | atomic_t inFlight; /* number of requests on the wire to server */ | 148 | atomic_t inFlight; /* number of requests on the wire to server */ |
146 | #ifdef CONFIG_CIFS_STATS2 | 149 | #ifdef CONFIG_CIFS_STATS2 |
147 | atomic_t inSend; /* requests trying to send */ | 150 | atomic_t inSend; /* requests trying to send */ |
@@ -192,13 +195,14 @@ struct cifsUidInfo { | |||
192 | * Session structure. One of these for each uid session with a particular host | 195 | * Session structure. One of these for each uid session with a particular host |
193 | */ | 196 | */ |
194 | struct cifsSesInfo { | 197 | struct cifsSesInfo { |
195 | struct list_head cifsSessionList; | 198 | struct list_head smb_ses_list; |
199 | struct list_head tcon_list; | ||
196 | struct semaphore sesSem; | 200 | struct semaphore sesSem; |
197 | #if 0 | 201 | #if 0 |
198 | struct cifsUidInfo *uidInfo; /* pointer to user info */ | 202 | struct cifsUidInfo *uidInfo; /* pointer to user info */ |
199 | #endif | 203 | #endif |
200 | struct TCP_Server_Info *server; /* pointer to server info */ | 204 | struct TCP_Server_Info *server; /* pointer to server info */ |
201 | atomic_t inUse; /* # of mounts (tree connections) on this ses */ | 205 | int ses_count; /* reference counter */ |
202 | enum statusEnum status; | 206 | enum statusEnum status; |
203 | unsigned overrideSecFlg; /* if non-zero override global sec flags */ | 207 | unsigned overrideSecFlg; /* if non-zero override global sec flags */ |
204 | __u16 ipc_tid; /* special tid for connection to IPC share */ | 208 | __u16 ipc_tid; /* special tid for connection to IPC share */ |
@@ -214,6 +218,7 @@ struct cifsSesInfo { | |||
214 | char userName[MAX_USERNAME_SIZE + 1]; | 218 | char userName[MAX_USERNAME_SIZE + 1]; |
215 | char *domainName; | 219 | char *domainName; |
216 | char *password; | 220 | char *password; |
221 | bool need_reconnect:1; /* connection reset, uid now invalid */ | ||
217 | }; | 222 | }; |
218 | /* no more than one of the following three session flags may be set */ | 223 | /* no more than one of the following three session flags may be set */ |
219 | #define CIFS_SES_NT4 1 | 224 | #define CIFS_SES_NT4 1 |
@@ -228,16 +233,15 @@ struct cifsSesInfo { | |||
228 | * session | 233 | * session |
229 | */ | 234 | */ |
230 | struct cifsTconInfo { | 235 | struct cifsTconInfo { |
231 | struct list_head cifsConnectionList; | 236 | struct list_head tcon_list; |
237 | int tc_count; | ||
232 | struct list_head openFileList; | 238 | struct list_head openFileList; |
233 | struct semaphore tconSem; | ||
234 | struct cifsSesInfo *ses; /* pointer to session associated with */ | 239 | struct cifsSesInfo *ses; /* pointer to session associated with */ |
235 | char treeName[MAX_TREE_SIZE + 1]; /* UNC name of resource in ASCII */ | 240 | char treeName[MAX_TREE_SIZE + 1]; /* UNC name of resource in ASCII */ |
236 | char *nativeFileSystem; | 241 | char *nativeFileSystem; |
237 | __u16 tid; /* The 2 byte tree id */ | 242 | __u16 tid; /* The 2 byte tree id */ |
238 | __u16 Flags; /* optional support bits */ | 243 | __u16 Flags; /* optional support bits */ |
239 | enum statusEnum tidStatus; | 244 | enum statusEnum tidStatus; |
240 | atomic_t useCount; /* how many explicit/implicit mounts to share */ | ||
241 | #ifdef CONFIG_CIFS_STATS | 245 | #ifdef CONFIG_CIFS_STATS |
242 | atomic_t num_smbs_sent; | 246 | atomic_t num_smbs_sent; |
243 | atomic_t num_writes; | 247 | atomic_t num_writes; |
@@ -286,6 +290,7 @@ struct cifsTconInfo { | |||
286 | bool unix_ext:1; /* if false disable Linux extensions to CIFS protocol | 290 | bool unix_ext:1; /* if false disable Linux extensions to CIFS protocol |
287 | for this mount even if server would support */ | 291 | for this mount even if server would support */ |
288 | bool local_lease:1; /* check leases (only) on local system not remote */ | 292 | bool local_lease:1; /* check leases (only) on local system not remote */ |
293 | bool need_reconnect:1; /* connection reset, tid now invalid */ | ||
289 | /* BB add field for back pointer to sb struct(s)? */ | 294 | /* BB add field for back pointer to sb struct(s)? */ |
290 | }; | 295 | }; |
291 | 296 | ||
@@ -586,21 +591,21 @@ require use of the stronger protocol */ | |||
586 | #endif | 591 | #endif |
587 | 592 | ||
588 | /* | 593 | /* |
589 | * The list of servers that did not respond with NT LM 0.12. | 594 | * the list of TCP_Server_Info structures, ie each of the sockets |
590 | * This list helps improve performance and eliminate the messages indicating | 595 | * connecting our client to a distinct server (ip address), is |
591 | * that we had a communications error talking to the server in this list. | 596 | * chained together by cifs_tcp_ses_list. The list of all our SMB |
597 | * sessions (and from that the tree connections) can be found | ||
598 | * by iterating over cifs_tcp_ses_list | ||
592 | */ | 599 | */ |
593 | /* Feature not supported */ | 600 | GLOBAL_EXTERN struct list_head cifs_tcp_ses_list; |
594 | /* GLOBAL_EXTERN struct servers_not_supported *NotSuppList; */ | ||
595 | 601 | ||
596 | /* | 602 | /* |
597 | * The following is a hash table of all the users we know about. | 603 | * This lock protects the cifs_tcp_ses_list, the list of smb sessions per |
604 | * tcp session, and the list of tcon's per smb session. It also protects | ||
605 | * the reference counters for the server, smb session, and tcon. Finally, | ||
606 | * changes to the tcon->tidStatus should be done while holding this lock. | ||
598 | */ | 607 | */ |
599 | GLOBAL_EXTERN struct smbUidInfo *GlobalUidList[UID_HASH]; | 608 | GLOBAL_EXTERN rwlock_t cifs_tcp_ses_lock; |
600 | |||
601 | /* GLOBAL_EXTERN struct list_head GlobalServerList; BB not implemented yet */ | ||
602 | GLOBAL_EXTERN struct list_head GlobalSMBSessionList; | ||
603 | GLOBAL_EXTERN struct list_head GlobalTreeConnectionList; | ||
604 | GLOBAL_EXTERN rwlock_t GlobalSMBSeslock; /* protects list inserts on 3 above */ | 609 | GLOBAL_EXTERN rwlock_t GlobalSMBSeslock; /* protects list inserts on 3 above */ |
605 | 610 | ||
606 | GLOBAL_EXTERN struct list_head GlobalOplock_Q; | 611 | GLOBAL_EXTERN struct list_head GlobalOplock_Q; |