Page Menu
Home
FreeBSD
Search
Configure Global Search
Log In
Files
F159234314
D56496.diff
No One
Temporary
Actions
View File
Edit File
Delete File
View Transforms
Subscribe
Mute Notifications
Flag For Later
Award Token
Size
1 KB
Referenced Files
None
Subscribers
None
D56496.diff
View Options
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
Details
Attached
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)
Attached To
Mode
D56496: p9fs: Implement msize mount option and bump default to 128 KiB
Attached
Detach File
Event Timeline
Log In to Comment