From 4f3b35c157e43107cc7e1f1aa06694e8b22e10bb Mon Sep 17 00:00:00 2001 From: Al Viro Date: Wed, 1 Apr 2015 19:57:53 -0400 Subject: net/9p: switch the guts of p9_client_{read,write}() to iov_iter ... and have get_user_pages_fast() mapping fewer pages than requested to generate a short read/write. Signed-off-by: Al Viro --- include/net/9p/transport.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'include/net') diff --git a/include/net/9p/transport.h b/include/net/9p/transport.h index 2a25dec..5122b5e 100644 --- a/include/net/9p/transport.h +++ b/include/net/9p/transport.h @@ -61,7 +61,7 @@ struct p9_trans_module { int (*cancel) (struct p9_client *, struct p9_req_t *req); int (*cancelled)(struct p9_client *, struct p9_req_t *req); int (*zc_request)(struct p9_client *, struct p9_req_t *, - char *, char *, int , int, int, int); + struct iov_iter *, struct iov_iter *, int , int, int); }; void v9fs_register_trans(struct p9_trans_module *m); -- cgit v1.1 From 070b3656cf228eaaef7b28b59264c5c7cdbdd0fb Mon Sep 17 00:00:00 2001 From: Al Viro Date: Wed, 1 Apr 2015 20:17:51 -0400 Subject: 9p: switch p9_client_write() to passing it struct iov_iter * ... and make it loop until it's done Signed-off-by: Al Viro --- include/net/9p/client.h | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) (limited to 'include/net') diff --git a/include/net/9p/client.h b/include/net/9p/client.h index 6fab66c..63ae765 100644 --- a/include/net/9p/client.h +++ b/include/net/9p/client.h @@ -211,6 +211,8 @@ struct p9_dirent { char d_name[256]; }; +struct iov_iter; + int p9_client_statfs(struct p9_fid *fid, struct p9_rstatfs *sb); int p9_client_rename(struct p9_fid *fid, struct p9_fid *newdirfid, const char *name); @@ -238,8 +240,7 @@ int p9_client_remove(struct p9_fid *fid); int p9_client_unlinkat(struct p9_fid *dfid, const char *name, int flags); int p9_client_read(struct p9_fid *fid, char *data, char __user *udata, u64 offset, u32 count); -int p9_client_write(struct p9_fid *fid, char *data, const char __user *udata, - u64 offset, u32 count); +int p9_client_write(struct p9_fid *fid, u64 offset, struct iov_iter *from, int *err); int p9_client_readdir(struct p9_fid *fid, char *data, u32 count, u64 offset); int p9dirent_read(struct p9_client *clnt, char *buf, int len, struct p9_dirent *dirent); -- cgit v1.1 From e1200fe68f20759f359698f8a8dc81d06d1265f5 Mon Sep 17 00:00:00 2001 From: Al Viro Date: Wed, 1 Apr 2015 23:42:28 -0400 Subject: 9p: switch p9_client_read() to passing struct iov_iter * ... and make it loop Signed-off-by: Al Viro --- include/net/9p/client.h | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) (limited to 'include/net') diff --git a/include/net/9p/client.h b/include/net/9p/client.h index 63ae765..c6b97e5 100644 --- a/include/net/9p/client.h +++ b/include/net/9p/client.h @@ -238,8 +238,7 @@ int p9_client_clunk(struct p9_fid *fid); int p9_client_fsync(struct p9_fid *fid, int datasync); int p9_client_remove(struct p9_fid *fid); int p9_client_unlinkat(struct p9_fid *dfid, const char *name, int flags); -int p9_client_read(struct p9_fid *fid, char *data, char __user *udata, - u64 offset, u32 count); +int p9_client_read(struct p9_fid *fid, u64 offset, struct iov_iter *to, int *err); int p9_client_write(struct p9_fid *fid, u64 offset, struct iov_iter *from, int *err); int p9_client_readdir(struct p9_fid *fid, char *data, u32 count, u64 offset); int p9dirent_read(struct p9_client *clnt, char *buf, int len, -- cgit v1.1