summaryrefslogtreecommitdiff
path: root/system
diff options
context:
space:
mode:
authorChristian Schoenebeck <qemu_oss@crudebyte.com>2026-06-13 16:55:49 +0200
committerChristian Schoenebeck <qemu_oss@crudebyte.com>2026-06-29 15:10:31 +0200
commite6116a81f04c48af9530d984d16ef4ed4346e865 (patch)
tree373896de6f4473084eb1f4b48ccaa6d3abb042d8 /system
parent693b296b176d1829b10855d9831bd2ad21b2cdcf (diff)
downloadqemu-e6116a81f04c48af9530d984d16ef4ed4346e865.tar.gz
qemu-e6116a81f04c48af9530d984d16ef4ed4346e865.zip
hw/9pfs: add max_xattr option
Previous patch introduced a limit of max. 1024 simultaneous xattr FIDs. This patch introduces an option "max_attr" that allows to override this limit, just for the case that some user might run into this limit for some reason, even if unlikely; or for reducing the limit further down (e.g. that default limit of 1024 would cap at max. 64 MiB host memory, at least on Linux hosts where the limit per xattr is 64k). This new "max_xattr" option can be specified with both -fsdev and -virtfs command line options, with the "local" and the "synth" fs drivers. The previous limit of 1024 is preserved as the default value. Link: https://lore.kernel.org/qemu-devel/b7631ac0d8dde0629bc7c4f2c4185d9f57b962b4.1781361555.git.qemu_oss@crudebyte.com Signed-off-by: Christian Schoenebeck <qemu_oss@crudebyte.com>
Diffstat (limited to 'system')
-rw-r--r--system/vl.c7
1 files changed, 6 insertions, 1 deletions
diff --git a/system/vl.c b/system/vl.c
index 1c0da7df29..1d14e2e207 100644
--- a/system/vl.c
+++ b/system/vl.c
@@ -3260,7 +3260,7 @@ void qemu_init(int argc, char **argv)
QemuOpts *fsdev;
QemuOpts *device;
const char *writeout, *sock_fd, *socket, *path, *security_model,
- *multidevs;
+ *multidevs, *max_xattr_str;
olist = qemu_find_opts("virtfs");
if (!olist) {
@@ -3324,6 +3324,11 @@ void qemu_init(int argc, char **argv)
if (multidevs) {
qemu_opt_set(fsdev, "multidevs", multidevs, &error_abort);
}
+ max_xattr_str = qemu_opt_get(opts, "max_xattr");
+ if (max_xattr_str) {
+ qemu_opt_set(fsdev, "max_xattr", max_xattr_str,
+ &error_abort);
+ }
device = qemu_opts_create(qemu_find_opts("device"), NULL, 0,
&error_abort);
qemu_opt_set(device, "driver", "virtio-9p-pci", &error_abort);