From: Christian Schoenebeck <linux_oss@crudebyte.com>
To: Dominique Martinet <asmadeus@codewreck.org>,
Stefano Stabellini <sstabellini@kernel.org>
Cc: v9fs-developer@lists.sourceforge.net,
linux-kernel@vger.kernel.org, GUO Zihua <guozihua@huawei.com>
Subject: [PATCH 1/2] net/9p: distinguish zero-copy requests
Date: Tue, 22 Nov 2022 00:03:58 +0100 [thread overview]
Message-ID: <5b4019594a93bc77b0e3298457c3d9ec0e08fbb5.1669072186.git.linux_oss@crudebyte.com> (raw)
In-Reply-To: <cover.1669072186.git.linux_oss@crudebyte.com>
Signed-off-by: Christian Schoenebeck <linux_oss@crudebyte.com>
---
include/net/9p/9p.h | 2 ++
net/9p/client.c | 4 ++++
2 files changed, 6 insertions(+)
diff --git a/include/net/9p/9p.h b/include/net/9p/9p.h
index 13abe013af21..b0a6dec20b92 100644
--- a/include/net/9p/9p.h
+++ b/include/net/9p/9p.h
@@ -530,6 +530,7 @@ 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
+ * @zc: whether zero-copy is used
* @sdata: payload
*
* &p9_fcall represents the structure for all 9P RPC
@@ -546,6 +547,7 @@ struct p9_fcall {
size_t offset;
size_t capacity;
+ bool zc;
struct kmem_cache *cache;
u8 *sdata;
diff --git a/net/9p/client.c b/net/9p/client.c
index aaa37b07e30a..30dd82f49b28 100644
--- a/net/9p/client.c
+++ b/net/9p/client.c
@@ -680,6 +680,8 @@ p9_client_rpc(struct p9_client *c, int8_t type, const char *fmt, ...)
if (IS_ERR(req))
return req;
+ req->tc.zc = req->rc.zc = false;
+
if (signal_pending(current)) {
sigpending = 1;
clear_thread_flag(TIF_SIGPENDING);
@@ -778,6 +780,8 @@ 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 = req->rc.zc = true;
+
if (signal_pending(current)) {
sigpending = 1;
clear_thread_flag(TIF_SIGPENDING);
--
2.30.2
next prev parent reply other threads:[~2022-11-21 23:56 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-11-21 23:09 [PATCH 0/2] net/9p: fix response size check in p9_check_errors() Christian Schoenebeck
2022-11-21 23:03 ` Christian Schoenebeck [this message]
2022-11-21 23:04 ` [PATCH 2/2] " Christian Schoenebeck
2022-11-22 0:21 ` Dominique Martinet
2022-11-22 11:20 ` Christian Schoenebeck
2022-11-22 9:37 ` kernel test robot
2022-11-22 2:27 ` [PATCH 0/2] " Stefano Stabellini
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=5b4019594a93bc77b0e3298457c3d9ec0e08fbb5.1669072186.git.linux_oss@crudebyte.com \
--to=linux_oss@crudebyte.com \
--cc=asmadeus@codewreck.org \
--cc=guozihua@huawei.com \
--cc=linux-kernel@vger.kernel.org \
--cc=sstabellini@kernel.org \
--cc=v9fs-developer@lists.sourceforge.net \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®