]> git.ipfire.org Git - thirdparty/libvirt.git/commitdiff
vz: remove disk cache mode hunk
authorNikolay Shirokovskiy <nshirokovskiy@virtuozzo.com>
Wed, 20 Apr 2016 14:05:28 +0000 (17:05 +0300)
committerMaxim Nestratov <mnestratov@virtuozzo.com>
Sat, 25 Jun 2016 19:56:01 +0000 (22:56 +0300)
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@virtuozzo.com>
src/vz/vz_sdk.c

index cb06240df9be6bb5215d42a7fb0e8c2711b727cc..a06196ca22eb998ef3634531303ae69d6466d0f9 100644 (file)
@@ -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);