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:
Ján Tomko 2024-07-23 14:14:13 +02:00
parent e62c26a20d
commit 8d3b239737

View File

@ -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));