Hi Ján, Could you add no_posix_lock and no_flock option for virtiofsd as well? The sample patch is as follows: --- docs/schemas/domaincommon.rng | 10 ++++++++++ src/conf/domain_conf.c | 10 ++++++++++ src/conf/domain_conf.h | 2 ++ src/qemu/qemu_extdevice.c | 10 ++++++++++ 4 files changed, 32 insertions(+) diff --git a/docs/schemas/domaincommon.rng b/docs/schemas/domaincommon.rng index f6479c9..6dd8e2a 100644 --- a/docs/schemas/domaincommon.rng +++ b/docs/schemas/domaincommon.rng @@ -2523,6 +2523,16 @@ <empty/> </element> </optional> + <optional> + <element name='no_posix_lock'> + <empty/> + </element> + </optional> + <optional> + <element name='no_flock'> + <empty/> + </element> + </optional> <optional> <ref name="alias"/> </optional> diff --git a/src/conf/domain_conf.c b/src/conf/domain_conf.c index 2694e4b..8223910 100644 --- a/src/conf/domain_conf.c +++ b/src/conf/domain_conf.c @@ -11055,6 +11055,10 @@ virDomainFSDefParseXML(virDomainXMLOptionPtr xmlopt, target = virXMLPropString(cur, "dir"); } else if (virXMLNodeNameEqual(cur, "readonly")) { def->readonly = true; + } else if (virXMLNodeNameEqual(cur, "no_posix_lock")) { + def->no_posix_lock = true; + } else if (virXMLNodeNameEqual(cur, "no_flock")) { + def->no_flock = true; } else if (virXMLNodeNameEqual(cur, "driver")) { if (!fsdriver) fsdriver = virXMLPropString(cur, "type"); @@ -24899,6 +24903,12 @@ virDomainFSDefFormat(virBufferPtr buf, if (def->readonly) virBufferAddLit(buf, "<readonly/>\n"); + if (def->no_posix_lock) + virBufferAddLit(buf, "<no_posix_lock/>\n"); + + if (def->no_flock) + virBufferAddLit(buf, "<no_flock/>\n"); + if (virDomainDeviceInfoFormat(buf, &def->info, flags) < 0) goto cleanup; diff --git a/src/conf/domain_conf.h b/src/conf/domain_conf.h index 78f88a0..8a60c8c 100644 --- a/src/conf/domain_conf.h +++ b/src/conf/domain_conf.h @@ -812,6 +812,8 @@ struct _virDomainFSDef { virStorageSourcePtr src; char *dst; bool readonly; + bool no_posix_lock; + bool no_flock; virDomainDeviceInfo info; unsigned long long space_hard_limit; /* in bytes */ unsigned long long space_soft_limit; /* in bytes */ diff --git a/src/qemu/qemu_extdevice.c b/src/qemu/qemu_extdevice.c index 634a3fb..618a886 100644 --- a/src/qemu/qemu_extdevice.c +++ b/src/qemu/qemu_extdevice.c @@ -242,6 +242,16 @@ qemuExtVirtioFSdStart(virQEMUDriverPtr driver, virCommandAddArgFormat(cmd, "source=%s", fs->src->path); virCommandAddArg(cmd, "-d"); + if (fs->no_posix_lock) { + virCommandAddArg(cmd, "-o"); + virCommandAddArg(cmd, "no_posix_lock"); + } + + if (fs->no_flock) { + virCommandAddArg(cmd, "-o"); + virCommandAddArg(cmd, "no_flock"); + } + if (qemuExtDeviceLogCommand(driver, vm, cmd, "virtiofsd") < 0) goto cleanup; -- 2.18.1 -- libvir-list mailing list libvir-list@xxxxxxxxxx https://www.redhat.com/mailman/listinfo/libvir-list