diff options
| author | Aneesh Kumar K.V <aneesh.kumar@linux.vnet.ibm.com> | 2011-08-16 01:20:10 -0400 |
|---|---|---|
| committer | Eric Van Hensbergen <ericvh@gmail.com> | 2011-10-24 12:13:11 -0400 |
| commit | abfa034e4b8ed0046fa589769e9840af645bc4ba (patch) | |
| tree | 146195e891a2fd63e3fc91f803547abb904b2087 /include/net/9p | |
| parent | c3b92c8787367a8bb53d57d9789b558f1295cc96 (diff) | |
fs/9p: Update zero-copy implementation in 9p
* remove lot of update to different data structure
* add a seperate callback for zero copy request.
* above makes non zero copy code path simpler
* remove conditionalizing TREAD/TREADDIR/TWRITE in the zero copy path
* Fix the dotu p9_check_errors with zero copy. Add sufficient doc around
* Add support for both in and output buffers in zero copy callback
* pin and unpin pages in the same context
* use helpers instead of defining page offset and rest of page ourself
* Fix mem leak in p9_check_errors
* Remove 'E' and 'F' in p9pdu_vwritef
Signed-off-by: Aneesh Kumar K.V <aneesh.kumar@linux.vnet.ibm.com>
Signed-off-by: Eric Van Hensbergen <ericvh@gmail.com>
Diffstat (limited to 'include/net/9p')
| -rw-r--r-- | include/net/9p/9p.h | 11 | ||||
| -rw-r--r-- | include/net/9p/transport.h | 10 |
2 files changed, 5 insertions, 16 deletions
diff --git a/include/net/9p/9p.h b/include/net/9p/9p.h index a6326ef8ade6..d83a01300871 100644 --- a/include/net/9p/9p.h +++ b/include/net/9p/9p.h | |||
| @@ -359,6 +359,9 @@ enum p9_qid_t { | |||
| 359 | /* Room for readdir header */ | 359 | /* Room for readdir header */ |
| 360 | #define P9_READDIRHDRSZ 24 | 360 | #define P9_READDIRHDRSZ 24 |
| 361 | 361 | ||
| 362 | /* size of header for zero copy read/write */ | ||
| 363 | #define P9_ZC_HDR_SZ 4096 | ||
| 364 | |||
| 362 | /** | 365 | /** |
| 363 | * struct p9_qid - file system entity information | 366 | * struct p9_qid - file system entity information |
| 364 | * @type: 8-bit type &p9_qid_t | 367 | * @type: 8-bit type &p9_qid_t |
| @@ -555,10 +558,6 @@ struct p9_rstatfs { | |||
| 555 | * @tag: transaction id of the request | 558 | * @tag: transaction id of the request |
| 556 | * @offset: used by marshalling routines to track current position in buffer | 559 | * @offset: used by marshalling routines to track current position in buffer |
| 557 | * @capacity: used by marshalling routines to track total malloc'd capacity | 560 | * @capacity: used by marshalling routines to track total malloc'd capacity |
| 558 | * @pubuf: Payload user buffer given by the caller | ||
| 559 | * @pkbuf: Payload kernel buffer given by the caller | ||
| 560 | * @pbuf_size: pubuf/pkbuf(only one will be !NULL) size to be read/write. | ||
| 561 | * @private: For transport layer's use. | ||
| 562 | * @sdata: payload | 561 | * @sdata: payload |
| 563 | * | 562 | * |
| 564 | * &p9_fcall represents the structure for all 9P RPC | 563 | * &p9_fcall represents the structure for all 9P RPC |
| @@ -575,10 +574,6 @@ struct p9_fcall { | |||
| 575 | 574 | ||
| 576 | size_t offset; | 575 | size_t offset; |
| 577 | size_t capacity; | 576 | size_t capacity; |
| 578 | char __user *pubuf; | ||
| 579 | char *pkbuf; | ||
| 580 | size_t pbuf_size; | ||
| 581 | void *private; | ||
| 582 | 577 | ||
| 583 | u8 *sdata; | 578 | u8 *sdata; |
| 584 | }; | 579 | }; |
diff --git a/include/net/9p/transport.h b/include/net/9p/transport.h index 83531ebeee99..adcbb20f6511 100644 --- a/include/net/9p/transport.h +++ b/include/net/9p/transport.h | |||
| @@ -26,13 +26,6 @@ | |||
| 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 | #define P9_TRANS_PREF_PAYLOAD_MASK 0x1 | ||
| 30 | |||
| 31 | /* Default. Add Payload to PDU before sending it down to transport layer */ | ||
| 32 | #define P9_TRANS_PREF_PAYLOAD_DEF 0x0 | ||
| 33 | /* Send pay load separately to transport layer along with PDU.*/ | ||
| 34 | #define P9_TRANS_PREF_PAYLOAD_SEP 0x1 | ||
| 35 | |||
| 36 | /** | 29 | /** |
| 37 | * struct p9_trans_module - transport module interface | 30 | * struct p9_trans_module - transport module interface |
| 38 | * @list: used to maintain a list of currently available transports | 31 | * @list: used to maintain a list of currently available transports |
| @@ -56,13 +49,14 @@ struct p9_trans_module { | |||
| 56 | struct list_head list; | 49 | struct list_head list; |
| 57 | char *name; /* name of transport */ | 50 | char *name; /* name of transport */ |
| 58 | int maxsize; /* max message size of transport */ | 51 | int maxsize; /* max message size of transport */ |
| 59 | int pref; /* Preferences of this transport */ | ||
| 60 | int def; /* this transport should be default */ | 52 | int def; /* this transport should be default */ |
| 61 | struct module *owner; | 53 | struct module *owner; |
| 62 | int (*create)(struct p9_client *, const char *, char *); | 54 | int (*create)(struct p9_client *, const char *, char *); |
| 63 | void (*close) (struct p9_client *); | 55 | void (*close) (struct p9_client *); |
| 64 | int (*request) (struct p9_client *, struct p9_req_t *req); | 56 | int (*request) (struct p9_client *, struct p9_req_t *req); |
| 65 | int (*cancel) (struct p9_client *, struct p9_req_t *req); | 57 | int (*cancel) (struct p9_client *, struct p9_req_t *req); |
| 58 | int (*zc_request)(struct p9_client *, struct p9_req_t *, | ||
| 59 | char *, char *, int , int, int, int); | ||
| 66 | }; | 60 | }; |
| 67 | 61 | ||
| 68 | void v9fs_register_trans(struct p9_trans_module *m); | 62 | void v9fs_register_trans(struct p9_trans_module *m); |
