diff options
Diffstat (limited to 'fs/cifs/cifsglob.h')
-rw-r--r-- | fs/cifs/cifsglob.h | 41 |
1 files changed, 22 insertions, 19 deletions
diff --git a/fs/cifs/cifsglob.h b/fs/cifs/cifsglob.h index 1cb1189f24e0..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]; |
@@ -143,7 +145,6 @@ struct TCP_Server_Info { | |||
143 | bool svlocal:1; /* local server or remote */ | 145 | bool svlocal:1; /* local server or remote */ |
144 | bool noblocksnd; /* use blocking sendmsg */ | 146 | bool noblocksnd; /* use blocking sendmsg */ |
145 | bool noautotune; /* do not autotune send buf sizes */ | 147 | bool noautotune; /* do not autotune send buf sizes */ |
146 | atomic_t socketUseCount; /* number of open cifs sessions on socket */ | ||
147 | atomic_t inFlight; /* number of requests on the wire to server */ | 148 | atomic_t inFlight; /* number of requests on the wire to server */ |
148 | #ifdef CONFIG_CIFS_STATS2 | 149 | #ifdef CONFIG_CIFS_STATS2 |
149 | atomic_t inSend; /* requests trying to send */ | 150 | atomic_t inSend; /* requests trying to send */ |
@@ -194,13 +195,14 @@ struct cifsUidInfo { | |||
194 | * 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 |
195 | */ | 196 | */ |
196 | struct cifsSesInfo { | 197 | struct cifsSesInfo { |
197 | struct list_head cifsSessionList; | 198 | struct list_head smb_ses_list; |
199 | struct list_head tcon_list; | ||
198 | struct semaphore sesSem; | 200 | struct semaphore sesSem; |
199 | #if 0 | 201 | #if 0 |
200 | struct cifsUidInfo *uidInfo; /* pointer to user info */ | 202 | struct cifsUidInfo *uidInfo; /* pointer to user info */ |
201 | #endif | 203 | #endif |
202 | struct TCP_Server_Info *server; /* pointer to server info */ | 204 | struct TCP_Server_Info *server; /* pointer to server info */ |
203 | atomic_t inUse; /* # of mounts (tree connections) on this ses */ | 205 | int ses_count; /* reference counter */ |
204 | enum statusEnum status; | 206 | enum statusEnum status; |
205 | unsigned overrideSecFlg; /* if non-zero override global sec flags */ | 207 | unsigned overrideSecFlg; /* if non-zero override global sec flags */ |
206 | __u16 ipc_tid; /* special tid for connection to IPC share */ | 208 | __u16 ipc_tid; /* special tid for connection to IPC share */ |
@@ -216,6 +218,7 @@ struct cifsSesInfo { | |||
216 | char userName[MAX_USERNAME_SIZE + 1]; | 218 | char userName[MAX_USERNAME_SIZE + 1]; |
217 | char *domainName; | 219 | char *domainName; |
218 | char *password; | 220 | char *password; |
221 | bool need_reconnect:1; /* connection reset, uid now invalid */ | ||
219 | }; | 222 | }; |
220 | /* 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 */ |
221 | #define CIFS_SES_NT4 1 | 224 | #define CIFS_SES_NT4 1 |
@@ -230,16 +233,15 @@ struct cifsSesInfo { | |||
230 | * session | 233 | * session |
231 | */ | 234 | */ |
232 | struct cifsTconInfo { | 235 | struct cifsTconInfo { |
233 | struct list_head cifsConnectionList; | 236 | struct list_head tcon_list; |
237 | int tc_count; | ||
234 | struct list_head openFileList; | 238 | struct list_head openFileList; |
235 | struct semaphore tconSem; | ||
236 | struct cifsSesInfo *ses; /* pointer to session associated with */ | 239 | struct cifsSesInfo *ses; /* pointer to session associated with */ |
237 | 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 */ |
238 | char *nativeFileSystem; | 241 | char *nativeFileSystem; |
239 | __u16 tid; /* The 2 byte tree id */ | 242 | __u16 tid; /* The 2 byte tree id */ |
240 | __u16 Flags; /* optional support bits */ | 243 | __u16 Flags; /* optional support bits */ |
241 | enum statusEnum tidStatus; | 244 | enum statusEnum tidStatus; |
242 | atomic_t useCount; /* how many explicit/implicit mounts to share */ | ||
243 | #ifdef CONFIG_CIFS_STATS | 245 | #ifdef CONFIG_CIFS_STATS |
244 | atomic_t num_smbs_sent; | 246 | atomic_t num_smbs_sent; |
245 | atomic_t num_writes; | 247 | atomic_t num_writes; |
@@ -288,6 +290,7 @@ struct cifsTconInfo { | |||
288 | 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 |
289 | for this mount even if server would support */ | 291 | for this mount even if server would support */ |
290 | 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 */ | ||
291 | /* BB add field for back pointer to sb struct(s)? */ | 294 | /* BB add field for back pointer to sb struct(s)? */ |
292 | }; | 295 | }; |
293 | 296 | ||
@@ -588,21 +591,21 @@ require use of the stronger protocol */ | |||
588 | #endif | 591 | #endif |
589 | 592 | ||
590 | /* | 593 | /* |
591 | * 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 |
592 | * This list helps improve performance and eliminate the messages indicating | 595 | * connecting our client to a distinct server (ip address), is |
593 | * 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 | ||
594 | */ | 599 | */ |
595 | /* Feature not supported */ | 600 | GLOBAL_EXTERN struct list_head cifs_tcp_ses_list; |
596 | /* GLOBAL_EXTERN struct servers_not_supported *NotSuppList; */ | ||
597 | 601 | ||
598 | /* | 602 | /* |
599 | * 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. | ||
600 | */ | 607 | */ |
601 | GLOBAL_EXTERN struct smbUidInfo *GlobalUidList[UID_HASH]; | 608 | GLOBAL_EXTERN rwlock_t cifs_tcp_ses_lock; |
602 | |||
603 | /* GLOBAL_EXTERN struct list_head GlobalServerList; BB not implemented yet */ | ||
604 | GLOBAL_EXTERN struct list_head GlobalSMBSessionList; | ||
605 | GLOBAL_EXTERN struct list_head GlobalTreeConnectionList; | ||
606 | GLOBAL_EXTERN rwlock_t GlobalSMBSeslock; /* protects list inserts on 3 above */ | 609 | GLOBAL_EXTERN rwlock_t GlobalSMBSeslock; /* protects list inserts on 3 above */ |
607 | 610 | ||
608 | GLOBAL_EXTERN struct list_head GlobalOplock_Q; | 611 | GLOBAL_EXTERN struct list_head GlobalOplock_Q; |