aboutsummaryrefslogtreecommitdiffstats
path: root/fs/cifs/cifsglob.h
diff options
context:
space:
mode:
authorSteve French <sfrench@us.ibm.com>2011-05-26 23:50:55 -0400
committerSteve French <sfrench@us.ibm.com>2011-05-26 23:50:55 -0400
commitf87d39d951329cd8f462bf9007d334122c0599d0 (patch)
treeba4c4d9dee6958c7d8ee87070a58d80389be2d2f /fs/cifs/cifsglob.h
parent641a58d66d086327042e9d73c6606fd02c8f067c (diff)
[CIFS] Migrate from prefixpath logic
Now we point superblock to a server share root and set a root dentry appropriately. This let us share superblock between mounts like //server/sharename/foo/bar and //server/sharename/foo further. Reviewed-by: Jeff Layton <jlayton@redhat.com> Signed-off-by: Pavel Shilovsky <piastry@etersoft.ru> Signed-off-by: Steve French <sfrench@us.ibm.com>
Diffstat (limited to 'fs/cifs/cifsglob.h')
-rw-r--r--fs/cifs/cifsglob.h75
1 files changed, 75 insertions, 0 deletions
diff --git a/fs/cifs/cifsglob.h b/fs/cifs/cifsglob.h
index 30699d9378e9..68ec457f8476 100644
--- a/fs/cifs/cifsglob.h
+++ b/fs/cifs/cifsglob.h
@@ -155,6 +155,61 @@ struct cifs_cred {
155 ***************************************************************** 155 *****************************************************************
156 */ 156 */
157 157
158struct smb_vol {
159 char *username;
160 char *password;
161 char *domainname;
162 char *UNC;
163 char *UNCip;
164 char *iocharset; /* local code page for mapping to and from Unicode */
165 char source_rfc1001_name[RFC1001_NAME_LEN_WITH_NULL]; /* clnt nb name */
166 char target_rfc1001_name[RFC1001_NAME_LEN_WITH_NULL]; /* srvr nb name */
167 uid_t cred_uid;
168 uid_t linux_uid;
169 gid_t linux_gid;
170 mode_t file_mode;
171 mode_t dir_mode;
172 unsigned secFlg;
173 bool retry:1;
174 bool intr:1;
175 bool setuids:1;
176 bool override_uid:1;
177 bool override_gid:1;
178 bool dynperm:1;
179 bool noperm:1;
180 bool no_psx_acl:1; /* set if posix acl support should be disabled */
181 bool cifs_acl:1;
182 bool no_xattr:1; /* set if xattr (EA) support should be disabled*/
183 bool server_ino:1; /* use inode numbers from server ie UniqueId */
184 bool direct_io:1;
185 bool strict_io:1; /* strict cache behavior */
186 bool remap:1; /* set to remap seven reserved chars in filenames */
187 bool posix_paths:1; /* unset to not ask for posix pathnames. */
188 bool no_linux_ext:1;
189 bool sfu_emul:1;
190 bool nullauth:1; /* attempt to authenticate with null user */
191 bool nocase:1; /* request case insensitive filenames */
192 bool nobrl:1; /* disable sending byte range locks to srv */
193 bool mand_lock:1; /* send mandatory not posix byte range lock reqs */
194 bool seal:1; /* request transport encryption on share */
195 bool nodfs:1; /* Do not request DFS, even if available */
196 bool local_lease:1; /* check leases only on local system, not remote */
197 bool noblocksnd:1;
198 bool noautotune:1;
199 bool nostrictsync:1; /* do not force expensive SMBflush on every sync */
200 bool fsc:1; /* enable fscache */
201 bool mfsymlinks:1; /* use Minshall+French Symlinks */
202 bool multiuser:1;
203 unsigned int rsize;
204 unsigned int wsize;
205 bool sockopt_tcp_nodelay:1;
206 unsigned short int port;
207 unsigned long actimeo; /* attribute cache timeout (jiffies) */
208 char *prepath;
209 struct sockaddr_storage srcaddr; /* allow binding to a local IP */
210 struct nls_table *local_nls;
211};
212
158struct TCP_Server_Info { 213struct TCP_Server_Info {
159 struct list_head tcp_ses_list; 214 struct list_head tcp_ses_list;
160 struct list_head smb_ses_list; 215 struct list_head smb_ses_list;
@@ -517,6 +572,26 @@ static inline char CIFS_DIR_SEP(const struct cifs_sb_info *cifs_sb)
517 return '\\'; 572 return '\\';
518} 573}
519 574
575static inline void
576convert_delimiter(char *path, char delim)
577{
578 int i;
579 char old_delim;
580
581 if (path == NULL)
582 return;
583
584 if (delim == '/')
585 old_delim = '\\';
586 else
587 old_delim = '/';
588
589 for (i = 0; path[i] != '\0'; i++) {
590 if (path[i] == old_delim)
591 path[i] = delim;
592 }
593}
594
520#ifdef CONFIG_CIFS_STATS 595#ifdef CONFIG_CIFS_STATS
521#define cifs_stats_inc atomic_inc 596#define cifs_stats_inc atomic_inc
522 597