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>
This commit is contained in:

committed by
Eric Van Hensbergen

parent
c3b92c8787
commit
abfa034e4b
@@ -359,6 +359,9 @@ enum p9_qid_t {
|
||||
/* Room for readdir header */
|
||||
#define P9_READDIRHDRSZ 24
|
||||
|
||||
/* size of header for zero copy read/write */
|
||||
#define P9_ZC_HDR_SZ 4096
|
||||
|
||||
/**
|
||||
* struct p9_qid - file system entity information
|
||||
* @type: 8-bit type &p9_qid_t
|
||||
@@ -555,10 +558,6 @@ struct p9_rstatfs {
|
||||
* @tag: transaction id of the request
|
||||
* @offset: used by marshalling routines to track current position in buffer
|
||||
* @capacity: used by marshalling routines to track total malloc'd capacity
|
||||
* @pubuf: Payload user buffer given by the caller
|
||||
* @pkbuf: Payload kernel buffer given by the caller
|
||||
* @pbuf_size: pubuf/pkbuf(only one will be !NULL) size to be read/write.
|
||||
* @private: For transport layer's use.
|
||||
* @sdata: payload
|
||||
*
|
||||
* &p9_fcall represents the structure for all 9P RPC
|
||||
@@ -575,10 +574,6 @@ struct p9_fcall {
|
||||
|
||||
size_t offset;
|
||||
size_t capacity;
|
||||
char __user *pubuf;
|
||||
char *pkbuf;
|
||||
size_t pbuf_size;
|
||||
void *private;
|
||||
|
||||
u8 *sdata;
|
||||
};
|
||||
|
@@ -26,13 +26,6 @@
|
||||
#ifndef NET_9P_TRANSPORT_H
|
||||
#define NET_9P_TRANSPORT_H
|
||||
|
||||
#define P9_TRANS_PREF_PAYLOAD_MASK 0x1
|
||||
|
||||
/* Default. Add Payload to PDU before sending it down to transport layer */
|
||||
#define P9_TRANS_PREF_PAYLOAD_DEF 0x0
|
||||
/* Send pay load separately to transport layer along with PDU.*/
|
||||
#define P9_TRANS_PREF_PAYLOAD_SEP 0x1
|
||||
|
||||
/**
|
||||
* struct p9_trans_module - transport module interface
|
||||
* @list: used to maintain a list of currently available transports
|
||||
@@ -56,13 +49,14 @@ struct p9_trans_module {
|
||||
struct list_head list;
|
||||
char *name; /* name of transport */
|
||||
int maxsize; /* max message size of transport */
|
||||
int pref; /* Preferences of this transport */
|
||||
int def; /* this transport should be default */
|
||||
struct module *owner;
|
||||
int (*create)(struct p9_client *, const char *, char *);
|
||||
void (*close) (struct p9_client *);
|
||||
int (*request) (struct p9_client *, struct p9_req_t *req);
|
||||
int (*cancel) (struct p9_client *, struct p9_req_t *req);
|
||||
int (*zc_request)(struct p9_client *, struct p9_req_t *,
|
||||
char *, char *, int , int, int, int);
|
||||
};
|
||||
|
||||
void v9fs_register_trans(struct p9_trans_module *m);
|
||||
|
Reference in New Issue
Block a user