mirror of
https://gitlab.com/libvirt/libvirt.git
synced 2024-11-09 23:10:08 +00:00
qemu: virtiofs: cache: use 'never' instead of 'none'
The new option style renamed one of the cache modes. https://issues.redhat.com/browse/RHEL-50329 Signed-off-by: Ján Tomko <jtomko@redhat.com> Reviewed-by: Michal Privoznik <mprivozn@redhat.com>
This commit is contained in:
parent
e62c26a20d
commit
8d3b239737
@ -147,10 +147,20 @@ qemuVirtioFSBuildCommandLine(virQEMUDriverConfig *cfg,
|
|||||||
virCommandAddArg(cmd, "--shared-dir");
|
virCommandAddArg(cmd, "--shared-dir");
|
||||||
virCommandAddArg(cmd, fs->src->path);
|
virCommandAddArg(cmd, fs->src->path);
|
||||||
|
|
||||||
if (fs->cache) {
|
switch (fs->cache) {
|
||||||
|
case VIR_DOMAIN_FS_CACHE_MODE_DEFAULT:
|
||||||
|
case VIR_DOMAIN_FS_CACHE_MODE_LAST:
|
||||||
|
break;
|
||||||
|
case VIR_DOMAIN_FS_CACHE_MODE_NONE:
|
||||||
|
virCommandAddArg(cmd, "--cache");
|
||||||
|
virCommandAddArg(cmd, "never");
|
||||||
|
break;
|
||||||
|
case VIR_DOMAIN_FS_CACHE_MODE_ALWAYS:
|
||||||
virCommandAddArg(cmd, "--cache");
|
virCommandAddArg(cmd, "--cache");
|
||||||
virCommandAddArg(cmd, virDomainFSCacheModeTypeToString(fs->cache));
|
virCommandAddArg(cmd, virDomainFSCacheModeTypeToString(fs->cache));
|
||||||
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (fs->sandbox) {
|
if (fs->sandbox) {
|
||||||
virCommandAddArg(cmd, "--sandbox");
|
virCommandAddArg(cmd, "--sandbox");
|
||||||
virCommandAddArg(cmd, virDomainFSSandboxModeTypeToString(fs->sandbox));
|
virCommandAddArg(cmd, virDomainFSSandboxModeTypeToString(fs->sandbox));
|
||||||
|
Loading…
Reference in New Issue
Block a user