net/9p: Adjust maximum MSIZE to account for p9 header
authorEric Van Hensbergen <ericvh@kernel.org>
Mon, 28 Nov 2022 00:38:36 +0000 (00:38 +0000)
committerEric Van Hensbergen <ericvh@kernel.org>
Thu, 23 Feb 2023 22:39:36 +0000 (22:39 +0000)
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>
net/9p/client.c

index 622ec6a..6c2a768 100644 (file)
 #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