summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--fsdev/file-op-9p.h4
-rw-r--r--hw/9pfs/9p-synth.c2
-rw-r--r--hw/9pfs/9p.c2
3 files changed, 7 insertions, 1 deletions
diff --git a/fsdev/file-op-9p.h b/fsdev/file-op-9p.h
index f2f7772c86..d51cec2f3b 100644
--- a/fsdev/file-op-9p.h
+++ b/fsdev/file-op-9p.h
@@ -64,6 +64,10 @@ typedef struct ExtendedOps {
*/
#define V9FS_REMAP_INODES 0x00000200
#define V9FS_FORBID_MULTIDEVS 0x00000400
+/*
+ * Disables certain performance warnings from being logged on host side.
+ */
+#define V9FS_NO_PERF_WARN 0x00000800
#define V9FS_SEC_MASK 0x0000003C
diff --git a/hw/9pfs/9p-synth.c b/hw/9pfs/9p-synth.c
index 7eb210ffa8..cec8c0eefc 100644
--- a/hw/9pfs/9p-synth.c
+++ b/hw/9pfs/9p-synth.c
@@ -541,6 +541,8 @@ static int synth_init(FsContext *ctx, Error **errp)
QLIST_INIT(&synth_root.child);
qemu_mutex_init(&synth_mutex);
+ ctx->export_flags |= V9FS_NO_PERF_WARN;
+
/* Add "." and ".." entries for root */
v9fs_add_dir_node(&synth_root, synth_root.attr->mode,
"..", synth_root.attr, synth_root.attr->inode);
diff --git a/hw/9pfs/9p.c b/hw/9pfs/9p.c
index 99b6f24fd6..741d222c3f 100644
--- a/hw/9pfs/9p.c
+++ b/hw/9pfs/9p.c
@@ -1354,7 +1354,7 @@ static void coroutine_fn v9fs_version(void *opaque)
}
/* 8192 is the default msize of Linux clients */
- if (s->msize <= 8192) {
+ if (s->msize <= 8192 && !(s->ctx.export_flags & V9FS_NO_PERF_WARN)) {
warn_report_once(
"9p: degraded performance: a reasonable high msize should be "
"chosen on client/guest side (chosen msize is <= 8192). See "