diff options
author | Linus Torvalds <torvalds@woody.linux-foundation.org> | 2007-10-17 18:05:58 -0400 |
---|---|---|
committer | Linus Torvalds <torvalds@woody.linux-foundation.org> | 2007-10-17 18:05:58 -0400 |
commit | 9d8190f87b5458160ba75d05e8ad6abefbe48a26 (patch) | |
tree | 7abeb91aa2a40b91004f53520b7bf1f2c80aab7e /include | |
parent | c2f73fd07d2ce4605b404f34395eb734a7ba9967 (diff) | |
parent | 982c37cfb6e61c0e64634abc2e305d757c1405b2 (diff) |
Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/ericvh/v9fs
* 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/ericvh/v9fs:
9p: remove sysctl
9p: fix bad kconfig cross-dependency
9p: soften invalidation in loose_mode
9p: attach-per-user
9p: rename uid and gid parameters
9p: define session flags
9p: Make transports dynamic
Diffstat (limited to 'include')
-rw-r--r-- | include/net/9p/9p.h | 21 | ||||
-rw-r--r-- | include/net/9p/client.h | 9 | ||||
-rw-r--r-- | include/net/9p/conn.h | 4 | ||||
-rw-r--r-- | include/net/9p/transport.h | 27 |
4 files changed, 29 insertions, 32 deletions
diff --git a/include/net/9p/9p.h b/include/net/9p/9p.h index 7726ff41c3e6..686425a97b0f 100644 --- a/include/net/9p/9p.h +++ b/include/net/9p/9p.h | |||
@@ -216,6 +216,7 @@ struct p9_tauth { | |||
216 | u32 afid; | 216 | u32 afid; |
217 | struct p9_str uname; | 217 | struct p9_str uname; |
218 | struct p9_str aname; | 218 | struct p9_str aname; |
219 | u32 n_uname; /* 9P2000.u extensions */ | ||
219 | }; | 220 | }; |
220 | 221 | ||
221 | struct p9_rauth { | 222 | struct p9_rauth { |
@@ -239,6 +240,7 @@ struct p9_tattach { | |||
239 | u32 afid; | 240 | u32 afid; |
240 | struct p9_str uname; | 241 | struct p9_str uname; |
241 | struct p9_str aname; | 242 | struct p9_str aname; |
243 | u32 n_uname; /* 9P2000.u extensions */ | ||
242 | }; | 244 | }; |
243 | 245 | ||
244 | struct p9_rattach { | 246 | struct p9_rattach { |
@@ -382,8 +384,9 @@ int p9_deserialize_fcall(void *buf, u32 buflen, struct p9_fcall *fc, int dotu); | |||
382 | void p9_set_tag(struct p9_fcall *fc, u16 tag); | 384 | void p9_set_tag(struct p9_fcall *fc, u16 tag); |
383 | struct p9_fcall *p9_create_tversion(u32 msize, char *version); | 385 | struct p9_fcall *p9_create_tversion(u32 msize, char *version); |
384 | struct p9_fcall *p9_create_tattach(u32 fid, u32 afid, char *uname, | 386 | struct p9_fcall *p9_create_tattach(u32 fid, u32 afid, char *uname, |
385 | char *aname); | 387 | char *aname, u32 n_uname, int dotu); |
386 | struct p9_fcall *p9_create_tauth(u32 afid, char *uname, char *aname); | 388 | struct p9_fcall *p9_create_tauth(u32 afid, char *uname, char *aname, |
389 | u32 n_uname, int dotu); | ||
387 | struct p9_fcall *p9_create_tflush(u16 oldtag); | 390 | struct p9_fcall *p9_create_tflush(u16 oldtag); |
388 | struct p9_fcall *p9_create_twalk(u32 fid, u32 newfid, u16 nwname, | 391 | struct p9_fcall *p9_create_twalk(u32 fid, u32 newfid, u16 nwname, |
389 | char **wnames); | 392 | char **wnames); |
@@ -412,18 +415,4 @@ int p9_idpool_check(int id, struct p9_idpool *p); | |||
412 | 415 | ||
413 | int p9_error_init(void); | 416 | int p9_error_init(void); |
414 | int p9_errstr2errno(char *, int); | 417 | int p9_errstr2errno(char *, int); |
415 | |||
416 | #ifdef CONFIG_SYSCTL | ||
417 | int __init p9_sysctl_register(void); | ||
418 | void __exit p9_sysctl_unregister(void); | ||
419 | #else | ||
420 | static inline int p9_sysctl_register(void) | ||
421 | { | ||
422 | return 0; | ||
423 | } | ||
424 | static inline void p9_sysctl_unregister(void) | ||
425 | { | ||
426 | } | ||
427 | #endif | ||
428 | |||
429 | #endif /* NET_9P_H */ | 418 | #endif /* NET_9P_H */ |
diff --git a/include/net/9p/client.h b/include/net/9p/client.h index d65ed7c69063..9b9221a21392 100644 --- a/include/net/9p/client.h +++ b/include/net/9p/client.h | |||
@@ -29,7 +29,7 @@ struct p9_client { | |||
29 | spinlock_t lock; /* protect client structure */ | 29 | spinlock_t lock; /* protect client structure */ |
30 | int msize; | 30 | int msize; |
31 | unsigned char dotu; | 31 | unsigned char dotu; |
32 | struct p9_transport *trans; | 32 | struct p9_trans *trans; |
33 | struct p9_conn *conn; | 33 | struct p9_conn *conn; |
34 | 34 | ||
35 | struct p9_idpool *fidpool; | 35 | struct p9_idpool *fidpool; |
@@ -52,13 +52,14 @@ struct p9_fid { | |||
52 | struct list_head dlist; /* list of all fids attached to a dentry */ | 52 | struct list_head dlist; /* list of all fids attached to a dentry */ |
53 | }; | 53 | }; |
54 | 54 | ||
55 | struct p9_client *p9_client_create(struct p9_transport *trans, int msize, | 55 | struct p9_client *p9_client_create(struct p9_trans *trans, int msize, |
56 | int dotu); | 56 | int dotu); |
57 | void p9_client_destroy(struct p9_client *clnt); | 57 | void p9_client_destroy(struct p9_client *clnt); |
58 | void p9_client_disconnect(struct p9_client *clnt); | 58 | void p9_client_disconnect(struct p9_client *clnt); |
59 | struct p9_fid *p9_client_attach(struct p9_client *clnt, struct p9_fid *afid, | 59 | struct p9_fid *p9_client_attach(struct p9_client *clnt, struct p9_fid *afid, |
60 | char *uname, char *aname); | 60 | char *uname, u32 n_uname, char *aname); |
61 | struct p9_fid *p9_client_auth(struct p9_client *clnt, char *uname, char *aname); | 61 | struct p9_fid *p9_client_auth(struct p9_client *clnt, char *uname, |
62 | u32 n_uname, char *aname); | ||
62 | struct p9_fid *p9_client_walk(struct p9_fid *oldfid, int nwname, char **wnames, | 63 | struct p9_fid *p9_client_walk(struct p9_fid *oldfid, int nwname, char **wnames, |
63 | int clone); | 64 | int clone); |
64 | int p9_client_open(struct p9_fid *fid, int mode); | 65 | int p9_client_open(struct p9_fid *fid, int mode); |
diff --git a/include/net/9p/conn.h b/include/net/9p/conn.h index 583b6a2cb3df..756d8784f953 100644 --- a/include/net/9p/conn.h +++ b/include/net/9p/conn.h | |||
@@ -42,8 +42,8 @@ struct p9_req; | |||
42 | */ | 42 | */ |
43 | typedef void (*p9_conn_req_callback)(struct p9_req *req, void *a); | 43 | typedef void (*p9_conn_req_callback)(struct p9_req *req, void *a); |
44 | 44 | ||
45 | struct p9_conn *p9_conn_create(struct p9_transport *trans, int msize, | 45 | struct p9_conn *p9_conn_create(struct p9_trans *trans, int msize, |
46 | unsigned char *dotu); | 46 | unsigned char *dotu); |
47 | void p9_conn_destroy(struct p9_conn *); | 47 | void p9_conn_destroy(struct p9_conn *); |
48 | int p9_conn_rpc(struct p9_conn *m, struct p9_fcall *tc, struct p9_fcall **rc); | 48 | int p9_conn_rpc(struct p9_conn *m, struct p9_fcall *tc, struct p9_fcall **rc); |
49 | 49 | ||
diff --git a/include/net/9p/transport.h b/include/net/9p/transport.h index 462d42279fb0..9dd4a05619a8 100644 --- a/include/net/9p/transport.h +++ b/include/net/9p/transport.h | |||
@@ -26,24 +26,31 @@ | |||
26 | #ifndef NET_9P_TRANSPORT_H | 26 | #ifndef NET_9P_TRANSPORT_H |
27 | #define NET_9P_TRANSPORT_H | 27 | #define NET_9P_TRANSPORT_H |
28 | 28 | ||
29 | enum p9_transport_status { | 29 | enum p9_trans_status { |
30 | Connected, | 30 | Connected, |
31 | Disconnected, | 31 | Disconnected, |
32 | Hung, | 32 | Hung, |
33 | }; | 33 | }; |
34 | 34 | ||
35 | struct p9_transport { | 35 | struct p9_trans { |
36 | enum p9_transport_status status; | 36 | enum p9_trans_status status; |
37 | void *priv; | 37 | void *priv; |
38 | int (*write) (struct p9_trans *, void *, int); | ||
39 | int (*read) (struct p9_trans *, void *, int); | ||
40 | void (*close) (struct p9_trans *); | ||
41 | unsigned int (*poll)(struct p9_trans *, struct poll_table_struct *); | ||
42 | }; | ||
38 | 43 | ||
39 | int (*write) (struct p9_transport *, void *, int); | 44 | struct p9_trans_module { |
40 | int (*read) (struct p9_transport *, void *, int); | 45 | struct list_head list; |
41 | void (*close) (struct p9_transport *); | 46 | char *name; /* name of transport */ |
42 | unsigned int (*poll)(struct p9_transport *, struct poll_table_struct *); | 47 | int maxsize; /* max message size of transport */ |
48 | int def; /* this transport should be default */ | ||
49 | struct p9_trans * (*create)(const char *devname, char *options); | ||
43 | }; | 50 | }; |
44 | 51 | ||
45 | struct p9_transport *p9_trans_create_tcp(const char *addr, int port); | 52 | void v9fs_register_trans(struct p9_trans_module *m); |
46 | struct p9_transport *p9_trans_create_unix(const char *addr); | 53 | struct p9_trans_module *v9fs_match_trans(const substring_t *name); |
47 | struct p9_transport *p9_trans_create_fd(int rfd, int wfd); | 54 | struct p9_trans_module *v9fs_default_trans(void); |
48 | 55 | ||
49 | #endif /* NET_9P_TRANSPORT_H */ | 56 | #endif /* NET_9P_TRANSPORT_H */ |