diff options
| -rw-r--r-- | include/net/9p/9p.h | 10 | ||||
| -rw-r--r-- | include/net/9p/client.h | 2 | ||||
| -rw-r--r-- | include/net/9p/transport.h | 3 | ||||
| -rw-r--r-- | net/9p/client.c | 10 |
4 files changed, 13 insertions, 12 deletions
diff --git a/include/net/9p/9p.h b/include/net/9p/9p.h index d2df55b0c213..104fec3c893b 100644 --- a/include/net/9p/9p.h +++ b/include/net/9p/9p.h | |||
| @@ -241,10 +241,10 @@ enum p9_open_mode_t { | |||
| 241 | 241 | ||
| 242 | /** | 242 | /** |
| 243 | * enum p9_perm_t - 9P permissions | 243 | * enum p9_perm_t - 9P permissions |
| 244 | * @P9_DMDIR: mode bite for directories | 244 | * @P9_DMDIR: mode bit for directories |
| 245 | * @P9_DMAPPEND: mode bit for is append-only | 245 | * @P9_DMAPPEND: mode bit for is append-only |
| 246 | * @P9_DMEXCL: mode bit for excluse use (only one open handle allowed) | 246 | * @P9_DMEXCL: mode bit for excluse use (only one open handle allowed) |
| 247 | * @P9_DMMOUNT: mode bite for mount points | 247 | * @P9_DMMOUNT: mode bit for mount points |
| 248 | * @P9_DMAUTH: mode bit for authentication file | 248 | * @P9_DMAUTH: mode bit for authentication file |
| 249 | * @P9_DMTMP: mode bit for non-backed-up files | 249 | * @P9_DMTMP: mode bit for non-backed-up files |
| 250 | * @P9_DMSYMLINK: mode bit for symbolic links (9P2000.u) | 250 | * @P9_DMSYMLINK: mode bit for symbolic links (9P2000.u) |
| @@ -362,7 +362,7 @@ struct p9_qid { | |||
| 362 | }; | 362 | }; |
| 363 | 363 | ||
| 364 | /** | 364 | /** |
| 365 | * struct p9_stat - file system metadata information | 365 | * struct p9_wstat - file system metadata information |
| 366 | * @size: length prefix for this stat structure instance | 366 | * @size: length prefix for this stat structure instance |
| 367 | * @type: the type of the server (equivalent to a major number) | 367 | * @type: the type of the server (equivalent to a major number) |
| 368 | * @dev: the sub-type of the server (equivalent to a minor number) | 368 | * @dev: the sub-type of the server (equivalent to a minor number) |
| @@ -687,10 +687,10 @@ struct p9_rwstat { | |||
| 687 | * @size: prefixed length of the structure | 687 | * @size: prefixed length of the structure |
| 688 | * @id: protocol operating identifier of type &p9_msg_t | 688 | * @id: protocol operating identifier of type &p9_msg_t |
| 689 | * @tag: transaction id of the request | 689 | * @tag: transaction id of the request |
| 690 | * @offset: used by marshalling routines to track currentposition in buffer | 690 | * @offset: used by marshalling routines to track current position in buffer |
| 691 | * @capacity: used by marshalling routines to track total malloc'd capacity | 691 | * @capacity: used by marshalling routines to track total malloc'd capacity |
| 692 | * @pubuf: Payload user buffer given by the caller | 692 | * @pubuf: Payload user buffer given by the caller |
| 693 | * @pubuf: Payload kernel buffer given by the caller | 693 | * @pkbuf: Payload kernel buffer given by the caller |
| 694 | * @pbuf_size: pubuf/pkbuf(only one will be !NULL) size to be read/write. | 694 | * @pbuf_size: pubuf/pkbuf(only one will be !NULL) size to be read/write. |
| 695 | * @private: For transport layer's use. | 695 | * @private: For transport layer's use. |
| 696 | * @sdata: payload | 696 | * @sdata: payload |
diff --git a/include/net/9p/client.h b/include/net/9p/client.h index 051a99f79769..d26d5e98a173 100644 --- a/include/net/9p/client.h +++ b/include/net/9p/client.h | |||
| @@ -60,7 +60,7 @@ enum p9_trans_status { | |||
| 60 | }; | 60 | }; |
| 61 | 61 | ||
| 62 | /** | 62 | /** |
| 63 | * enum p9_req_status_t - virtio request status | 63 | * enum p9_req_status_t - status of a request |
| 64 | * @REQ_STATUS_IDLE: request slot unused | 64 | * @REQ_STATUS_IDLE: request slot unused |
| 65 | * @REQ_STATUS_ALLOC: request has been allocated but not sent | 65 | * @REQ_STATUS_ALLOC: request has been allocated but not sent |
| 66 | * @REQ_STATUS_UNSENT: request waiting to be sent | 66 | * @REQ_STATUS_UNSENT: request waiting to be sent |
diff --git a/include/net/9p/transport.h b/include/net/9p/transport.h index 8f08c736c4c3..d8549fb9c742 100644 --- a/include/net/9p/transport.h +++ b/include/net/9p/transport.h | |||
| @@ -41,6 +41,7 @@ | |||
| 41 | * @pref: Preferences of this transport | 41 | * @pref: Preferences of this transport |
| 42 | * @def: set if this transport should be considered the default | 42 | * @def: set if this transport should be considered the default |
| 43 | * @create: member function to create a new connection on this transport | 43 | * @create: member function to create a new connection on this transport |
| 44 | * @close: member function to discard a connection on this transport | ||
| 44 | * @request: member function to issue a request to the transport | 45 | * @request: member function to issue a request to the transport |
| 45 | * @cancel: member function to cancel a request (if it hasn't been sent) | 46 | * @cancel: member function to cancel a request (if it hasn't been sent) |
| 46 | * | 47 | * |
| @@ -48,7 +49,7 @@ | |||
| 48 | * transport module with the 9P core network module and used by the client | 49 | * transport module with the 9P core network module and used by the client |
| 49 | * to instantiate a new connection on a transport. | 50 | * to instantiate a new connection on a transport. |
| 50 | * | 51 | * |
| 51 | * BUGS: the transport module list isn't protected. | 52 | * The transport module list is protected by v9fs_trans_lock. |
| 52 | */ | 53 | */ |
| 53 | 54 | ||
| 54 | struct p9_trans_module { | 55 | struct p9_trans_module { |
diff --git a/net/9p/client.c b/net/9p/client.c index ceab943dfc49..5b705559a6b2 100644 --- a/net/9p/client.c +++ b/net/9p/client.c | |||
| @@ -92,9 +92,6 @@ static int get_protocol_version(const substring_t *name) | |||
| 92 | return version; | 92 | return version; |
| 93 | } | 93 | } |
| 94 | 94 | ||
| 95 | static struct p9_req_t * | ||
| 96 | p9_client_rpc(struct p9_client *c, int8_t type, const char *fmt, ...); | ||
| 97 | |||
| 98 | /** | 95 | /** |
| 99 | * parse_options - parse mount options into client structure | 96 | * parse_options - parse mount options into client structure |
| 100 | * @opts: options string passed from mount | 97 | * @opts: options string passed from mount |
| @@ -518,12 +515,15 @@ out_err: | |||
| 518 | return err; | 515 | return err; |
| 519 | } | 516 | } |
| 520 | 517 | ||
| 518 | static struct p9_req_t * | ||
| 519 | p9_client_rpc(struct p9_client *c, int8_t type, const char *fmt, ...); | ||
| 520 | |||
| 521 | /** | 521 | /** |
| 522 | * p9_client_flush - flush (cancel) a request | 522 | * p9_client_flush - flush (cancel) a request |
| 523 | * @c: client state | 523 | * @c: client state |
| 524 | * @oldreq: request to cancel | 524 | * @oldreq: request to cancel |
| 525 | * | 525 | * |
| 526 | * This sents a flush for a particular requests and links | 526 | * This sents a flush for a particular request and links |
| 527 | * the flush request to the original request. The current | 527 | * the flush request to the original request. The current |
| 528 | * code only supports a single flush request although the protocol | 528 | * code only supports a single flush request although the protocol |
| 529 | * allows for multiple flush requests to be sent for a single request. | 529 | * allows for multiple flush requests to be sent for a single request. |
| @@ -1298,7 +1298,7 @@ p9_client_read(struct p9_fid *fid, char *data, char __user *udata, u64 offset, | |||
| 1298 | if (count < rsize) | 1298 | if (count < rsize) |
| 1299 | rsize = count; | 1299 | rsize = count; |
| 1300 | 1300 | ||
| 1301 | /* Don't bother zerocopy form small IO (< 1024) */ | 1301 | /* Don't bother zerocopy for small IO (< 1024) */ |
| 1302 | if (((clnt->trans_mod->pref & P9_TRANS_PREF_PAYLOAD_MASK) == | 1302 | if (((clnt->trans_mod->pref & P9_TRANS_PREF_PAYLOAD_MASK) == |
| 1303 | P9_TRANS_PREF_PAYLOAD_SEP) && (rsize > 1024)) { | 1303 | P9_TRANS_PREF_PAYLOAD_SEP) && (rsize > 1024)) { |
| 1304 | req = p9_client_rpc(clnt, P9_TREAD, "dqE", fid->fid, offset, | 1304 | req = p9_client_rpc(clnt, P9_TREAD, "dqE", fid->fid, offset, |
