aboutsummaryrefslogtreecommitdiffstats
path: root/net/9p/protocol.c
diff options
context:
space:
mode:
authorVenkateswararao Jujjuri (JV) <jvrao@linux.vnet.ibm.com>2011-01-28 17:11:13 -0500
committerEric Van Hensbergen <ericvh@gmail.com>2011-03-15 10:57:34 -0400
commit022cae36551ba805bf82084047945b2901d75f36 (patch)
tree5d8a8ff0eb2102d0449f58ddfcb8907bd3625682 /net/9p/protocol.c
parent6752a1ebd13f69b9d5ff08914fe29ee2813cbeea (diff)
[net/9p] Preparation and helper functions for zero copy
This patch prepares p9_fcall structure for zero copy. Added fields send the payload buffer information to the transport layer. In addition it adds a 'private' field for the transport layer to store mapped/pinned page information so that it can be freed/unpinned during req_done. This patch also creates trans_common.[ch] to house helper functions. It adds the following helper functions. p9_release_req_pages - Release pages after the transaction. p9_nr_pages - Return number of pages needed to accomodate the payload. payload_gup - Translates user buffer into kernel pages. Signed-off-by: Venkateswararao Jujjuri <jvrao@linux.vnet.ibm.com> Signed-off-by: Eric Van Hensbergen <ericvh@gmail.com>
Diffstat (limited to 'net/9p/protocol.c')
-rw-r--r--net/9p/protocol.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/net/9p/protocol.c b/net/9p/protocol.c
index 1e308f210928..d888847db56e 100644
--- a/net/9p/protocol.c
+++ b/net/9p/protocol.c
@@ -606,6 +606,10 @@ void p9pdu_reset(struct p9_fcall *pdu)
606{ 606{
607 pdu->offset = 0; 607 pdu->offset = 0;
608 pdu->size = 0; 608 pdu->size = 0;
609 pdu->private = NULL;
610 pdu->pubuf = NULL;
611 pdu->pkbuf = NULL;
612 pdu->pbuf_size = 0;
609} 613}
610 614
611int p9dirent_read(char *buf, int len, struct p9_dirent *dirent, 615int p9dirent_read(char *buf, int len, struct p9_dirent *dirent,