Merge pull request #117 from fidencio/wip/dont_always_set_cache_size

qemu: Don't set ".cache-size=" when CacheSize is 0
This commit is contained in:
Mark Ryan
2020-02-08 10:49:46 +01:00
committed by GitHub

View File

@@ -875,7 +875,9 @@ func (vhostuserDev VhostUserDevice) QemuParams(config *Config) []string {
devParams = append(devParams, string(driver))
devParams = append(devParams, fmt.Sprintf("chardev=%s", vhostuserDev.CharDevID))
devParams = append(devParams, fmt.Sprintf("tag=%s", vhostuserDev.Tag))
if vhostuserDev.CacheSize != 0 {
devParams = append(devParams, fmt.Sprintf("cache-size=%dM", vhostuserDev.CacheSize))
}
if vhostuserDev.SharedVersions {
devParams = append(devParams, "versiontable=/dev/shm/fuse_shared_versions")
}