aboutsummaryrefslogtreecommitdiffstats
path: root/include/net/9p
diff options
context:
space:
mode:
authorEric Van Hensbergen <ericvh@gmail.com>2008-10-16 09:30:07 -0400
committerEric Van Hensbergen <ericvh@gmail.com>2008-10-17 12:04:45 -0400
commit51a87c552dfd428e304c865e24ecbe091556f226 (patch)
tree6e9012962e6601b559dcf15ae3228647a8581a31 /include/net/9p
parentcb198131b0e7aba755ac164744536d461e86ab82 (diff)
9p: rework client code to use new protocol support functions
Now that the new protocol functions are in place, this patch switches the client code to using the new support code. Signed-off-by: Eric Van Hensbergen <ericvh@gmail.com>
Diffstat (limited to 'include/net/9p')
-rw-r--r--include/net/9p/9p.h7
-rw-r--r--include/net/9p/client.h7
2 files changed, 11 insertions, 3 deletions
diff --git a/include/net/9p/9p.h b/include/net/9p/9p.h
index 46d0b8f8e5ec..56c15aee6e61 100644
--- a/include/net/9p/9p.h
+++ b/include/net/9p/9p.h
@@ -39,6 +39,7 @@
39 * @P9_DEBUG_TRANS: transport tracing 39 * @P9_DEBUG_TRANS: transport tracing
40 * @P9_DEBUG_SLABS: memory management tracing 40 * @P9_DEBUG_SLABS: memory management tracing
41 * @P9_DEBUG_FCALL: verbose dump of protocol messages 41 * @P9_DEBUG_FCALL: verbose dump of protocol messages
42 * @P9_DEBUG_FID: fid allocation/deallocation tracking
42 * 43 *
43 * These flags are passed at mount time to turn on various levels of 44 * These flags are passed at mount time to turn on various levels of
44 * verbosity and tracing which will be output to the system logs. 45 * verbosity and tracing which will be output to the system logs.
@@ -53,13 +54,17 @@ enum p9_debug_flags {
53 P9_DEBUG_TRANS = (1<<6), 54 P9_DEBUG_TRANS = (1<<6),
54 P9_DEBUG_SLABS = (1<<7), 55 P9_DEBUG_SLABS = (1<<7),
55 P9_DEBUG_FCALL = (1<<8), 56 P9_DEBUG_FCALL = (1<<8),
57 P9_DEBUG_FID = (1<<9),
56}; 58};
57 59
58extern unsigned int p9_debug_level; 60extern unsigned int p9_debug_level;
59 61
60#define P9_DPRINTK(level, format, arg...) \ 62#define P9_DPRINTK(level, format, arg...) \
61do { \ 63do { \
62 if ((p9_debug_level & level) == level) \ 64 if (level == P9_DEBUG_9P) \
65 printk(KERN_NOTICE "(%8.8d) " \
66 format , task_pid_nr(current) , ## arg); \
67 else if ((p9_debug_level & level) == level) \
63 printk(KERN_NOTICE "-- %s (%d): " \ 68 printk(KERN_NOTICE "-- %s (%d): " \
64 format , __func__, task_pid_nr(current) , ## arg); \ 69 format , __func__, task_pid_nr(current) , ## arg); \
65} while (0) 70} while (0)
diff --git a/include/net/9p/client.h b/include/net/9p/client.h
index 475ef5cf1644..1e49b4d1030b 100644
--- a/include/net/9p/client.h
+++ b/include/net/9p/client.h
@@ -77,6 +77,7 @@ enum p9_req_status_t {
77 * struct p9_req_t - request slots 77 * struct p9_req_t - request slots
78 * @status: status of this request slot 78 * @status: status of this request slot
79 * @t_err: transport error 79 * @t_err: transport error
80 * @flush_tag: tag of request being flushed (for flush requests)
80 * @wq: wait_queue for the client to block on for this request 81 * @wq: wait_queue for the client to block on for this request
81 * @tc: the request fcall structure 82 * @tc: the request fcall structure
82 * @rc: the response fcall structure 83 * @rc: the response fcall structure
@@ -97,10 +98,10 @@ enum p9_req_status_t {
97struct p9_req_t { 98struct p9_req_t {
98 int status; 99 int status;
99 int t_err; 100 int t_err;
101 u16 flush_tag;
100 wait_queue_head_t *wq; 102 wait_queue_head_t *wq;
101 struct p9_fcall *tc; 103 struct p9_fcall *tc;
102 struct p9_fcall *rc; 104 struct p9_fcall *rc;
103 u16 flush_tag;
104 void *aux; 105 void *aux;
105 106
106 struct list_head req_list; 107 struct list_head req_list;
@@ -199,10 +200,12 @@ int p9_client_read(struct p9_fid *fid, char *data, char __user *udata,
199 u64 offset, u32 count); 200 u64 offset, u32 count);
200int p9_client_write(struct p9_fid *fid, char *data, const char __user *udata, 201int p9_client_write(struct p9_fid *fid, char *data, const char __user *udata,
201 u64 offset, u32 count); 202 u64 offset, u32 count);
202struct p9_stat *p9_client_stat(struct p9_fid *fid); 203struct p9_wstat *p9_client_stat(struct p9_fid *fid);
203int p9_client_wstat(struct p9_fid *fid, struct p9_wstat *wst); 204int p9_client_wstat(struct p9_fid *fid, struct p9_wstat *wst);
204 205
205struct p9_req_t *p9_tag_lookup(struct p9_client *, u16); 206struct p9_req_t *p9_tag_lookup(struct p9_client *, u16);
206void p9_client_cb(struct p9_client *c, struct p9_req_t *req); 207void p9_client_cb(struct p9_client *c, struct p9_req_t *req);
207 208
209void p9stat_free(struct p9_wstat *);
210
208#endif /* NET_9P_CLIENT_H */ 211#endif /* NET_9P_CLIENT_H */