Page MenuHomeFreeBSD

D56496.diff
No OneTemporary

D56496.diff

diff --git a/sys/fs/p9fs/p9_client.h b/sys/fs/p9fs/p9_client.h
--- a/sys/fs/p9fs/p9_client.h
+++ b/sys/fs/p9fs/p9_client.h
@@ -65,8 +65,11 @@
P9FS_DISCONNECT, /* transport has been dosconnected */
};
-/* This is set by QEMU so we will oblige */
-#define P9FS_MTU 8192
+/*
+ * This matches the Linux 5.15 and newer default.
+ * Note: Linux allows larger msize values than this.
+ */
+#define P9FS_MTU 131072
/*
* Even though we have a 8k buffer, Qemu is typically doing 8168
diff --git a/sys/fs/p9fs/p9_client.c b/sys/fs/p9fs/p9_client.c
--- a/sys/fs/p9fs/p9_client.c
+++ b/sys/fs/p9fs/p9_client.c
@@ -95,7 +95,14 @@
/* These are defaults for now */
clnt->proto_version = p9_proto_2000L;
- clnt->msize = 8192;
+ clnt->msize = P9FS_MTU;
+
+ vfs_scanopt(mp->mnt_optnew, "msize", "%u", &clnt->msize);
+ if (clnt->msize > P9FS_MTU) {
+ vfs_mount_error(mp, "msize %u is greater than max allowed %u",
+ clnt->msize, P9FS_MTU);
+ return (EINVAL);
+ }
/* Get the default trans callback */
clnt->ops = p9_get_trans_by_name(trans);
diff --git a/sys/fs/p9fs/p9fs_vfsops.c b/sys/fs/p9fs/p9fs_vfsops.c
--- a/sys/fs/p9fs/p9fs_vfsops.c
+++ b/sys/fs/p9fs/p9fs_vfsops.c
@@ -59,7 +59,7 @@
/* option parsing */
static const char *p9fs_opts[] = {
- "from", "trans", "access", NULL
+ "from", "trans", "access", "msize", NULL
};
/* Dispose p9fs node, freeing it to the UMA zone */

File Metadata

Mime Type
text/plain
Expires
Fri, Jun 12, 4:09 PM (14 h, 37 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
33911370
Default Alt Text
D56496.diff (1 KB)

Event Timeline