This code was added as a part of huge patch that moves driver from working with prlctl to vz sdk so there is no good explanation why this is done this way. The problem that it is not correct. vz sdk cache mode parameter affects all domain disks while this hunk resets its on every disk to a new value. Signed-off-by: Nikolay Shirokovskiy <nshirokovskiy@xxxxxxxxxxxxx> --- src/vz/vz_sdk.c | 18 ------------------ 1 file changed, 18 deletions(-) diff --git a/src/vz/vz_sdk.c b/src/vz/vz_sdk.c index 9b783af..bff52f9 100644 --- a/src/vz/vz_sdk.c +++ b/src/vz/vz_sdk.c @@ -3293,24 +3293,6 @@ static int prlsdkAddDisk(vzDriverPtr driver, pret = PrlVmDev_SetStackIndex(sdkdisk, idx); prlsdkCheckRetGoto(pret, cleanup); - switch (disk->cachemode) { - case VIR_DOMAIN_DISK_CACHE_DISABLE: - pret = PrlVmCfg_SetDiskCacheWriteBack(sdkdom, PRL_FALSE); - prlsdkCheckRetGoto(pret, cleanup); - break; - case VIR_DOMAIN_DISK_CACHE_WRITEBACK: - pret = PrlVmCfg_SetDiskCacheWriteBack(sdkdom, PRL_TRUE); - prlsdkCheckRetGoto(pret, cleanup); - break; - case VIR_DOMAIN_DISK_CACHE_DEFAULT: - break; - default: - virReportError(VIR_ERR_CONFIG_UNSUPPORTED, "%s", - _("Specified disk cache mode is not " - "supported by vz driver.")); - goto cleanup; - } - return 0; cleanup: PrlHandle_Free(sdkdisk); -- 1.8.3.1 -- libvir-list mailing list libvir-list@xxxxxxxxxx https://www.redhat.com/mailman/listinfo/libvir-list