diff options
author | Eric Van Hensbergen <ericvh@gmail.com> | 2008-10-13 19:45:21 -0400 |
---|---|---|
committer | Eric Van Hensbergen <ericvh@gmail.com> | 2008-10-17 12:04:42 -0400 |
commit | 91b8534fa8f5e01f249b1bf8df0a2540053549ad (patch) | |
tree | fde6b3b63dad229108106553106995889b4f0fa7 /include/net | |
parent | 1b0a763bdd5ed467d0e03b88e045000c749303fb (diff) |
9p: make rpc code common and rework flush code
This code moves the rpc function to the common client base,
reorganizes the flush code to be more simple and stable, and
makes the necessary adjustments to the underlying transports
to adapt to the new structure.
This reduces the overall amount of code duplication between the
transports and should make adding new transports more straightforward.
Signed-off-by: Eric Van Hensbergen <ericvh@gmail.com>
Diffstat (limited to 'include/net')
-rw-r--r-- | include/net/9p/client.h | 3 | ||||
-rw-r--r-- | include/net/9p/transport.h | 8 |
2 files changed, 5 insertions, 6 deletions
diff --git a/include/net/9p/client.h b/include/net/9p/client.h index 4fecaabd17bd..6a71d9067818 100644 --- a/include/net/9p/client.h +++ b/include/net/9p/client.h | |||
@@ -212,8 +212,7 @@ struct p9_stat *p9_client_stat(struct p9_fid *fid); | |||
212 | int p9_client_wstat(struct p9_fid *fid, struct p9_wstat *wst); | 212 | int p9_client_wstat(struct p9_fid *fid, struct p9_wstat *wst); |
213 | struct p9_stat *p9_client_dirread(struct p9_fid *fid, u64 offset); | 213 | struct p9_stat *p9_client_dirread(struct p9_fid *fid, u64 offset); |
214 | 214 | ||
215 | struct p9_req_t *p9_tag_alloc(struct p9_client *, u16); | ||
216 | struct p9_req_t *p9_tag_lookup(struct p9_client *, u16); | 215 | struct p9_req_t *p9_tag_lookup(struct p9_client *, u16); |
217 | void p9_free_req(struct p9_client *, struct p9_req_t *); | 216 | void p9_client_cb(struct p9_client *c, struct p9_req_t *req); |
218 | 217 | ||
219 | #endif /* NET_9P_CLIENT_H */ | 218 | #endif /* NET_9P_CLIENT_H */ |
diff --git a/include/net/9p/transport.h b/include/net/9p/transport.h index 3e0f2f6beba2..6d5886efb102 100644 --- a/include/net/9p/transport.h +++ b/include/net/9p/transport.h | |||
@@ -33,8 +33,8 @@ | |||
33 | * @maxsize: transport provided maximum packet size | 33 | * @maxsize: transport provided maximum packet size |
34 | * @def: set if this transport should be considered the default | 34 | * @def: set if this transport should be considered the default |
35 | * @create: member function to create a new connection on this transport | 35 | * @create: member function to create a new connection on this transport |
36 | * @close: member function to disconnect and close the transport | 36 | * @request: member function to issue a request to the transport |
37 | * @rpc: member function to issue a request to the transport | 37 | * @cancel: member function to cancel a request (if it hasn't been sent) |
38 | * | 38 | * |
39 | * This is the basic API for a transport module which is registered by the | 39 | * This is the basic API for a transport module which is registered by the |
40 | * transport module with the 9P core network module and used by the client | 40 | * transport module with the 9P core network module and used by the client |
@@ -51,8 +51,8 @@ struct p9_trans_module { | |||
51 | struct module *owner; | 51 | struct module *owner; |
52 | int (*create)(struct p9_client *, const char *, char *); | 52 | int (*create)(struct p9_client *, const char *, char *); |
53 | void (*close) (struct p9_client *); | 53 | void (*close) (struct p9_client *); |
54 | int (*rpc) (struct p9_client *t, struct p9_fcall *tc, | 54 | int (*request) (struct p9_client *, struct p9_req_t *req); |
55 | struct p9_fcall **rc); | 55 | int (*cancel) (struct p9_client *, struct p9_req_t *req); |
56 | }; | 56 | }; |
57 | 57 | ||
58 | void v9fs_register_trans(struct p9_trans_module *m); | 58 | void v9fs_register_trans(struct p9_trans_module *m); |