summaryrefslogtreecommitdiff
path: root/net/9p/client.c
diff options
context:
space:
mode:
authorChristian Schoenebeck <linux_oss@crudebyte.com>2022-11-22 20:20:22 +0100
committerDominique Martinet <asmadeus@codewreck.org>2022-12-06 07:30:55 +0900
commit8e4c2eee1e15c1206c26f6b28b05fe9711a427c6 (patch)
tree1a31c7e069db25fc2cb009d2283365ef2992529b /net/9p/client.c
parentf15e006b831384aaec4b4f13265c0dff88ef09dd (diff)
net/9p: distinguish zero-copy requests
Add boolean `zc` member to struct p9_fcall to distinguish zero-copy messages (not using the linear `sdata` buffer for message payload) from regular messages (which do copy message payload to `sdata` before being further processed). This new member is appended to end of structure to avoid inserting huge padding in generated layout. Link: https://lkml.kernel.org/r/8f2a5c12a446c3b544da64e0b1550e1fb2d6f972.1669144861.git.linux_oss@crudebyte.com Signed-off-by: Christian Schoenebeck <linux_oss@crudebyte.com> Tested-by: Stefano Stabellini <sstabellini@kernel.org> Signed-off-by: Dominique Martinet <asmadeus@codewreck.org>
Diffstat (limited to 'net/9p/client.c')
-rw-r--r--net/9p/client.c6
1 files changed, 6 insertions, 0 deletions
diff --git a/net/9p/client.c b/net/9p/client.c
index b554f8357f96..a2b4a965a5a9 100644
--- a/net/9p/client.c
+++ b/net/9p/client.c
@@ -685,6 +685,9 @@ p9_client_rpc(struct p9_client *c, int8_t type, const char *fmt, ...)
if (IS_ERR(req))
return req;
+ req->tc.zc = false;
+ req->rc.zc = false;
+
if (signal_pending(current)) {
sigpending = 1;
clear_thread_flag(TIF_SIGPENDING);
@@ -783,6 +786,9 @@ static struct p9_req_t *p9_client_zc_rpc(struct p9_client *c, int8_t type,
if (IS_ERR(req))
return req;
+ req->tc.zc = true;
+ req->rc.zc = true;
+
if (signal_pending(current)) {
sigpending = 1;
clear_thread_flag(TIF_SIGPENDING);