From 2e6ff2da7573d29a22ac7b9ec5a9a04a44335f74 Mon Sep 17 00:00:00 2001 From: Nikolay Shirokovskiy Date: Wed, 20 Apr 2016 17:05:28 +0300 Subject: [PATCH] vz: remove disk cache mode hunk 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 --- 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 cb06240df9..a06196ca22 100644 --- a/src/vz/vz_sdk.c +++ b/src/vz/vz_sdk.c @@ -3280,24 +3280,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);