On 10/21/25 15:10, Ján Tomko via Devel wrote: > From: Ján Tomko <[email protected]> > > In that case, libvirtd cannot set it on the command line because > virtiofsd is not launched by libvirt. > > https://issues.redhat.com/browse/RHEL-87522 > > Signed-off-by: Ján Tomko <[email protected]> > --- > src/qemu/qemu_validate.c | 6 +++ > ...st-user-fs-sock-readonly.x86_64-latest.err | 1 + > .../vhost-user-fs-sock-readonly.xml | 41 +++++++++++++++++++ > tests/qemuxmlconftest.c | 1 + > 4 files changed, 49 insertions(+) > create mode 100644 > tests/qemuxmlconfdata/vhost-user-fs-sock-readonly.x86_64-latest.err > create mode 100644 tests/qemuxmlconfdata/vhost-user-fs-sock-readonly.xml > > diff --git a/src/qemu/qemu_validate.c b/src/qemu/qemu_validate.c > index 3e8fdb2268..3b0f2b50a5 100644 > --- a/src/qemu/qemu_validate.c > +++ b/src/qemu/qemu_validate.c > @@ -5022,6 +5022,12 @@ qemuValidateDomainDeviceDefFS(virDomainFSDef *fs, > _("virtiofs does not support wrpolicy")); > return -1; > } > + } else { > + if (fs->readonly) { > + virReportError(VIR_ERR_CONFIG_UNSUPPORTED, "%s", > + _("readonly mode cannot be set for externally > started virtiofsd")); > + return -1; > + }
I think there's more to be checked (e.g. fs->cache, fs->sandbox, fs->xattr, etc.), but this is a good start. Reviewed-by: Michal Privoznik <[email protected]> Michal
