summaryrefslogtreecommitdiff
path: root/net
diff options
context:
space:
mode:
authorEric Van Hensbergen <ericvh@kernel.org>2022-11-28 03:38:36 +0300
committerEric Van Hensbergen <ericvh@kernel.org>2023-02-24 01:39:36 +0300
commit2a03472262c05f965d7ba394ed35dc9867ba3095 (patch)
tree78959bcdc0e02606be527a77d491bcb2d2e04fbf /net
parent88603b6dc419445847923fcb7fe5080067a30f98 (diff)
downloadlinux-2a03472262c05f965d7ba394ed35dc9867ba3095.tar.xz
net/9p: Adjust maximum MSIZE to account for p9 header
Add maximum p9 header size to MSIZE to make sure we can have page aligned data. Signed-off-by: Eric Van Hensbergen <ericvh@kernel.org> Reviewed-by: Dominique Martinet <asmadeus@codewreck.org>
Diffstat (limited to 'net')
-rw-r--r--net/9p/client.c6
1 files changed, 5 insertions, 1 deletions
diff --git a/net/9p/client.c b/net/9p/client.c
index 622ec6a586ee..6c2a768a6ab1 100644
--- a/net/9p/client.c
+++ b/net/9p/client.c
@@ -28,7 +28,11 @@
#define CREATE_TRACE_POINTS
#include <trace/events/9p.h>
-#define DEFAULT_MSIZE (128 * 1024)
+/* DEFAULT MSIZE = 32 pages worth of payload + P9_HDRSZ +
+ * room for write (16 extra) or read (11 extra) operands.
+ */
+
+#define DEFAULT_MSIZE ((128 * 1024) + P9_IOHDRSZ)
/* Client Option Parsing (code inspired by NFS code)
* - a little lazy - parse all client options