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
@@ -12,21 +12,6 @@
|
||||
*
|
||||
*/
|
||||
|
||||
/* TRUE if it is user context */
|
||||
#define P9_IS_USER_CONTEXT (!segment_eq(get_fs(), KERNEL_DS))
|
||||
|
||||
/**
|
||||
* struct trans_rpage_info - To store mapped page information in PDU.
|
||||
* @rp_alloc:Set if this structure is allocd, not a reuse unused space in pdu.
|
||||
* @rp_nr_pages: Number of mapped pages
|
||||
* @rp_data: Array of page pointers
|
||||
*/
|
||||
struct trans_rpage_info {
|
||||
u8 rp_alloc;
|
||||
int rp_nr_pages;
|
||||
struct page *rp_data[0];
|
||||
};
|
||||
|
||||
void p9_release_req_pages(struct trans_rpage_info *);
|
||||
int p9_payload_gup(struct p9_req_t *, size_t *, int *, int, u8);
|
||||
int p9_nr_pages(struct p9_req_t *);
|
||||
void p9_release_pages(struct page **, int);
|
||||
int p9_payload_gup(char *, int *, struct page **, int);
|
||||
int p9_nr_pages(char *, int);
|
||||
|
Reference in New Issue
Block a user