aboutsummaryrefslogtreecommitdiffstats
path: root/fs/9p/v9fs.h
diff options
context:
space:
mode:
Diffstat (limited to 'fs/9p/v9fs.h')
-rw-r--r--fs/9p/v9fs.h38
1 files changed, 22 insertions, 16 deletions
diff --git a/fs/9p/v9fs.h b/fs/9p/v9fs.h
index abc4b1668ace..db4b4193f2e2 100644
--- a/fs/9p/v9fs.h
+++ b/fs/9p/v9fs.h
@@ -29,31 +29,30 @@
29struct v9fs_session_info { 29struct v9fs_session_info {
30 /* options */ 30 /* options */
31 unsigned int maxdata; 31 unsigned int maxdata;
32 unsigned char extended; /* set to 1 if we are using UNIX extensions */ 32 unsigned char flags; /* session flags */
33 unsigned char nodev; /* set to 1 if no disable device mapping */ 33 unsigned char nodev; /* set to 1 if no disable device mapping */
34 unsigned short port; /* port to connect to */
35 unsigned short debug; /* debug level */ 34 unsigned short debug; /* debug level */
36 unsigned short proto; /* protocol to use */
37 unsigned int afid; /* authentication fid */ 35 unsigned int afid; /* authentication fid */
38 unsigned int rfdno; /* read file descriptor number */
39 unsigned int wfdno; /* write file descriptor number */
40 unsigned int cache; /* cache mode */ 36 unsigned int cache; /* cache mode */
41 37
42 char *name; /* user name to mount as */ 38 char *options; /* copy of mount options */
43 char *remotename; /* name of remote hierarchy being mounted */ 39 char *uname; /* user name to mount as */
44 unsigned int uid; /* default uid/muid for legacy support */ 40 char *aname; /* name of remote hierarchy being mounted */
45 unsigned int gid; /* default gid for legacy support */ 41 unsigned int dfltuid; /* default uid/muid for legacy support */
46 42 unsigned int dfltgid; /* default gid for legacy support */
43 u32 uid; /* if ACCESS_SINGLE, the uid that has access */
44 struct p9_trans_module *trans; /* 9p transport */
47 struct p9_client *clnt; /* 9p client */ 45 struct p9_client *clnt; /* 9p client */
48 struct dentry *debugfs_dir; 46 struct dentry *debugfs_dir;
49}; 47};
50 48
51/* possible values of ->proto */ 49/* session flags */
52enum { 50enum {
53 PROTO_TCP, 51 V9FS_EXTENDED = 0x01, /* 9P2000.u */
54 PROTO_UNIX, 52 V9FS_ACCESS_MASK = 0x06, /* access mask */
55 PROTO_FD, 53 V9FS_ACCESS_SINGLE = 0x02, /* only one user can access the files */
56 PROTO_PCI, 54 V9FS_ACCESS_USER = 0x04, /* attache per user */
55 V9FS_ACCESS_ANY = 0x06, /* use the same attach for all users */
57}; 56};
58 57
59/* possible values of ->cache */ 58/* possible values of ->cache */
@@ -73,11 +72,18 @@ void v9fs_session_cancel(struct v9fs_session_info *v9ses);
73#define V9FS_MAGIC 0x01021997 72#define V9FS_MAGIC 0x01021997
74 73
75/* other default globals */ 74/* other default globals */
76#define V9FS_PORT 564 75#define V9FS_PORT 564
77#define V9FS_DEFUSER "nobody" 76#define V9FS_DEFUSER "nobody"
78#define V9FS_DEFANAME "" 77#define V9FS_DEFANAME ""
78#define V9FS_DEFUID (-2)
79#define V9FS_DEFGID (-2)
79 80
80static inline struct v9fs_session_info *v9fs_inode2v9ses(struct inode *inode) 81static inline struct v9fs_session_info *v9fs_inode2v9ses(struct inode *inode)
81{ 82{
82 return (inode->i_sb->s_fs_info); 83 return (inode->i_sb->s_fs_info);
83} 84}
85
86static inline int v9fs_extended(struct v9fs_session_info *v9ses)
87{
88 return v9ses->flags & V9FS_EXTENDED;
89}