diff options
author | Eric Van Hensbergen <ericvh@gmail.com> | 2008-10-13 19:45:22 -0400 |
---|---|---|
committer | Eric Van Hensbergen <ericvh@gmail.com> | 2008-10-17 12:04:42 -0400 |
commit | 673d62cdaac6ffbce980a349d3174b3929ceb9e5 (patch) | |
tree | 2917ded31ef9b3ab004c3a5575537643b34269e9 /include/net/9p/client.h | |
parent | ff683452f7bc52d7fd653cf5e67b1134555734c7 (diff) |
9p: apply common request code to trans_fd
Apply the now common p9_req_t structure to the fd transport.
Signed-off-by: Eric Van Hensbergen <ericvh@gmail.com>
Diffstat (limited to 'include/net/9p/client.h')
-rw-r--r-- | include/net/9p/client.h | 10 |
1 files changed, 9 insertions, 1 deletions
diff --git a/include/net/9p/client.h b/include/net/9p/client.h index 140cf1d58452..4fecaabd17bd 100644 --- a/include/net/9p/client.h +++ b/include/net/9p/client.h | |||
@@ -49,11 +49,12 @@ enum p9_trans_status { | |||
49 | * enum p9_req_status_t - virtio request status | 49 | * enum p9_req_status_t - virtio request status |
50 | * @REQ_STATUS_IDLE: request slot unused | 50 | * @REQ_STATUS_IDLE: request slot unused |
51 | * @REQ_STATUS_ALLOC: request has been allocated but not sent | 51 | * @REQ_STATUS_ALLOC: request has been allocated but not sent |
52 | * @REQ_STATUS_UNSENT: request waiting to be sent | ||
52 | * @REQ_STATUS_SENT: request sent to server | 53 | * @REQ_STATUS_SENT: request sent to server |
53 | * @REQ_STATUS_FLSH: a flush has been sent for this request | 54 | * @REQ_STATUS_FLSH: a flush has been sent for this request |
54 | * @REQ_STATUS_RCVD: response received from server | 55 | * @REQ_STATUS_RCVD: response received from server |
55 | * @REQ_STATUS_FLSHD: request has been flushed | 56 | * @REQ_STATUS_FLSHD: request has been flushed |
56 | * @REQ_STATUS_ERR: request encountered an error on the client side | 57 | * @REQ_STATUS_ERROR: request encountered an error on the client side |
57 | * | 58 | * |
58 | * The @REQ_STATUS_IDLE state is used to mark a request slot as unused | 59 | * The @REQ_STATUS_IDLE state is used to mark a request slot as unused |
59 | * but use is actually tracked by the idpool structure which handles tag | 60 | * but use is actually tracked by the idpool structure which handles tag |
@@ -64,6 +65,7 @@ enum p9_trans_status { | |||
64 | enum p9_req_status_t { | 65 | enum p9_req_status_t { |
65 | REQ_STATUS_IDLE, | 66 | REQ_STATUS_IDLE, |
66 | REQ_STATUS_ALLOC, | 67 | REQ_STATUS_ALLOC, |
68 | REQ_STATUS_UNSENT, | ||
67 | REQ_STATUS_SENT, | 69 | REQ_STATUS_SENT, |
68 | REQ_STATUS_FLSH, | 70 | REQ_STATUS_FLSH, |
69 | REQ_STATUS_RCVD, | 71 | REQ_STATUS_RCVD, |
@@ -79,6 +81,8 @@ enum p9_req_status_t { | |||
79 | * @tc: the request fcall structure | 81 | * @tc: the request fcall structure |
80 | * @rc: the response fcall structure | 82 | * @rc: the response fcall structure |
81 | * @aux: transport specific data (provided for trans_fd migration) | 83 | * @aux: transport specific data (provided for trans_fd migration) |
84 | * @tag: tag on request (BUG: redundant) | ||
85 | * @req_list: link for higher level objects to chain requests | ||
82 | * | 86 | * |
83 | * Transport use an array to track outstanding requests | 87 | * Transport use an array to track outstanding requests |
84 | * instead of a list. While this may incurr overhead during initial | 88 | * instead of a list. While this may incurr overhead during initial |
@@ -99,6 +103,9 @@ struct p9_req_t { | |||
99 | struct p9_fcall *rc; | 103 | struct p9_fcall *rc; |
100 | u16 flush_tag; | 104 | u16 flush_tag; |
101 | void *aux; | 105 | void *aux; |
106 | |||
107 | int tag; | ||
108 | struct list_head req_list; | ||
102 | }; | 109 | }; |
103 | 110 | ||
104 | /** | 111 | /** |
@@ -207,5 +214,6 @@ struct p9_stat *p9_client_dirread(struct p9_fid *fid, u64 offset); | |||
207 | 214 | ||
208 | struct p9_req_t *p9_tag_alloc(struct p9_client *, u16); | 215 | struct p9_req_t *p9_tag_alloc(struct p9_client *, u16); |
209 | struct p9_req_t *p9_tag_lookup(struct p9_client *, u16); | 216 | struct p9_req_t *p9_tag_lookup(struct p9_client *, u16); |
217 | void p9_free_req(struct p9_client *, struct p9_req_t *); | ||
210 | 218 | ||
211 | #endif /* NET_9P_CLIENT_H */ | 219 | #endif /* NET_9P_CLIENT_H */ |