diff options
Diffstat (limited to 'include/linux/smb_fs_sb.h')
-rw-r--r-- | include/linux/smb_fs_sb.h | 100 |
1 files changed, 0 insertions, 100 deletions
diff --git a/include/linux/smb_fs_sb.h b/include/linux/smb_fs_sb.h deleted file mode 100644 index bb947dd1fba9..000000000000 --- a/include/linux/smb_fs_sb.h +++ /dev/null | |||
@@ -1,100 +0,0 @@ | |||
1 | /* | ||
2 | * smb_fs_sb.h | ||
3 | * | ||
4 | * Copyright (C) 1995 by Paal-Kr. Engstad and Volker Lendecke | ||
5 | * Copyright (C) 1997 by Volker Lendecke | ||
6 | * | ||
7 | */ | ||
8 | |||
9 | #ifndef _SMB_FS_SB | ||
10 | #define _SMB_FS_SB | ||
11 | |||
12 | #include <linux/types.h> | ||
13 | #include <linux/backing-dev.h> | ||
14 | #include <linux/smb.h> | ||
15 | |||
16 | /* | ||
17 | * Upper limit on the total number of active smb_request structs. | ||
18 | */ | ||
19 | #define MAX_REQUEST_HARD 256 | ||
20 | |||
21 | enum smb_receive_state { | ||
22 | SMB_RECV_START, /* No data read, looking for length + sig */ | ||
23 | SMB_RECV_HEADER, /* Reading the header data */ | ||
24 | SMB_RECV_HCOMPLETE, /* Done with the header */ | ||
25 | SMB_RECV_PARAM, /* Reading parameter words */ | ||
26 | SMB_RECV_DATA, /* Reading data bytes */ | ||
27 | SMB_RECV_END, /* End of request */ | ||
28 | SMB_RECV_DROP, /* Dropping this SMB */ | ||
29 | SMB_RECV_REQUEST, /* Received a request and not a reply */ | ||
30 | }; | ||
31 | |||
32 | /* structure access macros */ | ||
33 | #define server_from_inode(inode) SMB_SB((inode)->i_sb) | ||
34 | #define server_from_dentry(dentry) SMB_SB((dentry)->d_sb) | ||
35 | #define SB_of(server) ((server)->super_block) | ||
36 | |||
37 | struct smb_sb_info { | ||
38 | /* List of all smbfs superblocks */ | ||
39 | struct list_head entry; | ||
40 | |||
41 | enum smb_conn_state state; | ||
42 | struct file * sock_file; | ||
43 | int conn_error; | ||
44 | enum smb_receive_state rstate; | ||
45 | |||
46 | atomic_t nr_requests; | ||
47 | struct list_head xmitq; | ||
48 | struct list_head recvq; | ||
49 | u16 mid; | ||
50 | |||
51 | struct smb_mount_data_kernel *mnt; | ||
52 | |||
53 | /* Connections are counted. Each time a new socket arrives, | ||
54 | * generation is incremented. | ||
55 | */ | ||
56 | unsigned int generation; | ||
57 | struct pid *conn_pid; | ||
58 | struct smb_conn_opt opt; | ||
59 | wait_queue_head_t conn_wq; | ||
60 | int conn_complete; | ||
61 | struct semaphore sem; | ||
62 | |||
63 | unsigned char header[SMB_HEADER_LEN + 20*2 + 2]; | ||
64 | u32 header_len; | ||
65 | u32 smb_len; | ||
66 | u32 smb_read; | ||
67 | |||
68 | /* We use our own data_ready callback, but need the original one */ | ||
69 | void *data_ready; | ||
70 | |||
71 | /* nls pointers for codepage conversions */ | ||
72 | struct nls_table *remote_nls; | ||
73 | struct nls_table *local_nls; | ||
74 | |||
75 | struct smb_ops *ops; | ||
76 | |||
77 | struct super_block *super_block; | ||
78 | |||
79 | struct backing_dev_info bdi; | ||
80 | }; | ||
81 | |||
82 | static inline int | ||
83 | smb_lock_server_interruptible(struct smb_sb_info *server) | ||
84 | { | ||
85 | return down_interruptible(&(server->sem)); | ||
86 | } | ||
87 | |||
88 | static inline void | ||
89 | smb_lock_server(struct smb_sb_info *server) | ||
90 | { | ||
91 | down(&(server->sem)); | ||
92 | } | ||
93 | |||
94 | static inline void | ||
95 | smb_unlock_server(struct smb_sb_info *server) | ||
96 | { | ||
97 | up(&(server->sem)); | ||
98 | } | ||
99 | |||
100 | #endif | ||