mirror of
https://gitlab.com/libvirt/libvirt.git
synced 2024-12-23 06:05:27 +00:00
sched: provide new API shims for remaining drivers
Well, the remaining drivers that already had the get/set scheduler parameter functionality to begin with. For now, this blindly treats VIR_DOMAIN_SCHEDINFO_CURRENT as the only supported operation for these 5 domains; it will take domain-specific patches if more specific behavior is preferred. * src/esx/esx_driver.c (esxDomainGetSchedulerParameters) (esxDomainSetSchedulerParameters): Move guts... (esxDomainGetSchedulerParametersFlags) (esxDomainSetSchedulerParametersFlags): ...to new functions. * src/libxl/libxl_driver.c (libxlDomainGetSchedulerParameters) (libxlDomainSetSchedulerParameters) (libxlDomainGetSchedulerParametersFlags) (libxlDomainSetSchedulerParametersFlags): Likewise. * src/lxc/lxc_driver.c (lxcGetSchedulerParameters) (lxcSetSchedulerParameters, lxcGetSchedulerParametersFlags) (lxcSetSchedulerParametersFlags): Likewise. * src/test/test_driver.c (testDomainGetSchedulerParams) (testDomainSetSchedulerParams, testDomainGetSchedulerParamsFlags) (testDomainSetSchedulerParamsFlags): Likewise. * src/xen/xen_driver.c (xenUnifiedDomainGetSchedulerParameters) (xenUnifiedDomainSetSchedulerParameters) (xenUnifiedDomainGetSchedulerParametersFlags) (xenUnifiedDomainSetSchedulerParametersFlags): Likewise.
This commit is contained in:
parent
97f63513ff
commit
bb6cb66fde
@ -3559,8 +3559,9 @@ esxDomainGetSchedulerType(virDomainPtr domain ATTRIBUTE_UNUSED, int *nparams)
|
|||||||
|
|
||||||
|
|
||||||
static int
|
static int
|
||||||
esxDomainGetSchedulerParameters(virDomainPtr domain,
|
esxDomainGetSchedulerParametersFlags(virDomainPtr domain,
|
||||||
virTypedParameterPtr params, int *nparams)
|
virTypedParameterPtr params, int *nparams,
|
||||||
|
unsigned int flags)
|
||||||
{
|
{
|
||||||
int result = -1;
|
int result = -1;
|
||||||
esxPrivate *priv = domain->conn->privateData;
|
esxPrivate *priv = domain->conn->privateData;
|
||||||
@ -3571,6 +3572,8 @@ esxDomainGetSchedulerParameters(virDomainPtr domain,
|
|||||||
unsigned int mask = 0;
|
unsigned int mask = 0;
|
||||||
int i = 0;
|
int i = 0;
|
||||||
|
|
||||||
|
virCheckFlags(0, -1);
|
||||||
|
|
||||||
if (*nparams < 3) {
|
if (*nparams < 3) {
|
||||||
ESX_ERROR(VIR_ERR_INVALID_ARG, "%s",
|
ESX_ERROR(VIR_ERR_INVALID_ARG, "%s",
|
||||||
_("Parameter array must have space for 3 items"));
|
_("Parameter array must have space for 3 items"));
|
||||||
@ -3681,11 +3684,18 @@ esxDomainGetSchedulerParameters(virDomainPtr domain,
|
|||||||
return result;
|
return result;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
static int
|
||||||
|
esxDomainGetSchedulerParameters(virDomainPtr domain,
|
||||||
|
virTypedParameterPtr params, int *nparams)
|
||||||
|
{
|
||||||
|
return esxDomainGetSchedulerParametersFlags(domain, params, nparams, 0);
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
static int
|
static int
|
||||||
esxDomainSetSchedulerParameters(virDomainPtr domain,
|
esxDomainSetSchedulerParametersFlags(virDomainPtr domain,
|
||||||
virTypedParameterPtr params, int nparams)
|
virTypedParameterPtr params, int nparams,
|
||||||
|
unsigned int flags)
|
||||||
{
|
{
|
||||||
int result = -1;
|
int result = -1;
|
||||||
esxPrivate *priv = domain->conn->privateData;
|
esxPrivate *priv = domain->conn->privateData;
|
||||||
@ -3697,6 +3707,8 @@ esxDomainSetSchedulerParameters(virDomainPtr domain,
|
|||||||
char *taskInfoErrorMessage = NULL;
|
char *taskInfoErrorMessage = NULL;
|
||||||
int i;
|
int i;
|
||||||
|
|
||||||
|
virCheckFlags(0, -1);
|
||||||
|
|
||||||
if (esxVI_EnsureSession(priv->primary) < 0) {
|
if (esxVI_EnsureSession(priv->primary) < 0) {
|
||||||
return -1;
|
return -1;
|
||||||
}
|
}
|
||||||
@ -3812,6 +3824,12 @@ esxDomainSetSchedulerParameters(virDomainPtr domain,
|
|||||||
return result;
|
return result;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
static int
|
||||||
|
esxDomainSetSchedulerParameters(virDomainPtr domain,
|
||||||
|
virTypedParameterPtr params, int nparams)
|
||||||
|
{
|
||||||
|
return esxDomainSetSchedulerParametersFlags(domain, params, nparams, 0);
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
static int
|
static int
|
||||||
@ -4711,7 +4729,9 @@ static virDriver esxDriver = {
|
|||||||
.domainSetAutostart = esxDomainSetAutostart, /* 0.9.0 */
|
.domainSetAutostart = esxDomainSetAutostart, /* 0.9.0 */
|
||||||
.domainGetSchedulerType = esxDomainGetSchedulerType, /* 0.7.0 */
|
.domainGetSchedulerType = esxDomainGetSchedulerType, /* 0.7.0 */
|
||||||
.domainGetSchedulerParameters = esxDomainGetSchedulerParameters, /* 0.7.0 */
|
.domainGetSchedulerParameters = esxDomainGetSchedulerParameters, /* 0.7.0 */
|
||||||
|
.domainGetSchedulerParametersFlags = esxDomainGetSchedulerParametersFlags, /* 0.9.2 */
|
||||||
.domainSetSchedulerParameters = esxDomainSetSchedulerParameters, /* 0.7.0 */
|
.domainSetSchedulerParameters = esxDomainSetSchedulerParameters, /* 0.7.0 */
|
||||||
|
.domainSetSchedulerParametersFlags = esxDomainSetSchedulerParametersFlags, /* 0.9.2 */
|
||||||
.domainMigratePrepare = esxDomainMigratePrepare, /* 0.7.0 */
|
.domainMigratePrepare = esxDomainMigratePrepare, /* 0.7.0 */
|
||||||
.domainMigratePerform = esxDomainMigratePerform, /* 0.7.0 */
|
.domainMigratePerform = esxDomainMigratePerform, /* 0.7.0 */
|
||||||
.domainMigrateFinish = esxDomainMigrateFinish, /* 0.7.0 */
|
.domainMigrateFinish = esxDomainMigrateFinish, /* 0.7.0 */
|
||||||
|
@ -2950,8 +2950,10 @@ cleanup:
|
|||||||
}
|
}
|
||||||
|
|
||||||
static int
|
static int
|
||||||
libxlDomainGetSchedulerParameters(virDomainPtr dom, virTypedParameterPtr params,
|
libxlDomainGetSchedulerParametersFlags(virDomainPtr dom,
|
||||||
int *nparams)
|
virTypedParameterPtr params,
|
||||||
|
int *nparams,
|
||||||
|
unsigned int flags)
|
||||||
{
|
{
|
||||||
libxlDriverPrivatePtr driver = dom->conn->privateData;
|
libxlDriverPrivatePtr driver = dom->conn->privateData;
|
||||||
libxlDomainObjPrivatePtr priv;
|
libxlDomainObjPrivatePtr priv;
|
||||||
@ -2960,6 +2962,8 @@ libxlDomainGetSchedulerParameters(virDomainPtr dom, virTypedParameterPtr params,
|
|||||||
int sched_id;
|
int sched_id;
|
||||||
int ret = -1;
|
int ret = -1;
|
||||||
|
|
||||||
|
virCheckFlags(0, -1);
|
||||||
|
|
||||||
libxlDriverLock(driver);
|
libxlDriverLock(driver);
|
||||||
vm = virDomainFindByUUID(&driver->domains, dom->uuid);
|
vm = virDomainFindByUUID(&driver->domains, dom->uuid);
|
||||||
libxlDriverUnlock(driver);
|
libxlDriverUnlock(driver);
|
||||||
@ -3027,8 +3031,17 @@ cleanup:
|
|||||||
}
|
}
|
||||||
|
|
||||||
static int
|
static int
|
||||||
libxlDomainSetSchedulerParameters(virDomainPtr dom, virTypedParameterPtr params,
|
libxlDomainGetSchedulerParameters(virDomainPtr dom, virTypedParameterPtr params,
|
||||||
int nparams)
|
int *nparams)
|
||||||
|
{
|
||||||
|
return libxlDomainGetSchedulerParametersFlags(dom, params, nparams, 0);
|
||||||
|
}
|
||||||
|
|
||||||
|
static int
|
||||||
|
libxlDomainSetSchedulerParametersFlags(virDomainPtr dom,
|
||||||
|
virTypedParameterPtr params,
|
||||||
|
int nparams,
|
||||||
|
unsigned int flags)
|
||||||
{
|
{
|
||||||
libxlDriverPrivatePtr driver = dom->conn->privateData;
|
libxlDriverPrivatePtr driver = dom->conn->privateData;
|
||||||
libxlDomainObjPrivatePtr priv;
|
libxlDomainObjPrivatePtr priv;
|
||||||
@ -3038,6 +3051,8 @@ libxlDomainSetSchedulerParameters(virDomainPtr dom, virTypedParameterPtr params,
|
|||||||
int i;
|
int i;
|
||||||
int ret = -1;
|
int ret = -1;
|
||||||
|
|
||||||
|
virCheckFlags(0, -1);
|
||||||
|
|
||||||
libxlDriverLock(driver);
|
libxlDriverLock(driver);
|
||||||
vm = virDomainFindByUUID(&driver->domains, dom->uuid);
|
vm = virDomainFindByUUID(&driver->domains, dom->uuid);
|
||||||
libxlDriverUnlock(driver);
|
libxlDriverUnlock(driver);
|
||||||
@ -3114,6 +3129,13 @@ cleanup:
|
|||||||
return ret;
|
return ret;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
static int
|
||||||
|
libxlDomainSetSchedulerParameters(virDomainPtr dom, virTypedParameterPtr params,
|
||||||
|
int nparams)
|
||||||
|
{
|
||||||
|
return libxlDomainSetSchedulerParametersFlags(dom, params, nparams, 0);
|
||||||
|
}
|
||||||
|
|
||||||
static int
|
static int
|
||||||
libxlDomainIsActive(virDomainPtr dom)
|
libxlDomainIsActive(virDomainPtr dom)
|
||||||
{
|
{
|
||||||
@ -3266,7 +3288,9 @@ static virDriver libxlDriver = {
|
|||||||
.domainSetAutostart = libxlDomainSetAutostart, /* 0.9.0 */
|
.domainSetAutostart = libxlDomainSetAutostart, /* 0.9.0 */
|
||||||
.domainGetSchedulerType = libxlDomainGetSchedulerType, /* 0.9.0 */
|
.domainGetSchedulerType = libxlDomainGetSchedulerType, /* 0.9.0 */
|
||||||
.domainGetSchedulerParameters = libxlDomainGetSchedulerParameters, /* 0.9.0 */
|
.domainGetSchedulerParameters = libxlDomainGetSchedulerParameters, /* 0.9.0 */
|
||||||
|
.domainGetSchedulerParametersFlags = libxlDomainGetSchedulerParametersFlags, /* 0.9.2 */
|
||||||
.domainSetSchedulerParameters = libxlDomainSetSchedulerParameters, /* 0.9.0 */
|
.domainSetSchedulerParameters = libxlDomainSetSchedulerParameters, /* 0.9.0 */
|
||||||
|
.domainSetSchedulerParametersFlags = libxlDomainSetSchedulerParametersFlags, /* 0.9.2 */
|
||||||
.nodeGetFreeMemory = libxlNodeGetFreeMemory, /* 0.9.0 */
|
.nodeGetFreeMemory = libxlNodeGetFreeMemory, /* 0.9.0 */
|
||||||
.domainEventRegister = libxlDomainEventRegister, /* 0.9.0 */
|
.domainEventRegister = libxlDomainEventRegister, /* 0.9.0 */
|
||||||
.domainEventDeregister = libxlDomainEventDeregister, /* 0.9.0 */
|
.domainEventDeregister = libxlDomainEventDeregister, /* 0.9.0 */
|
||||||
|
@ -2161,9 +2161,11 @@ static char *lxcGetSchedulerType(virDomainPtr domain ATTRIBUTE_UNUSED,
|
|||||||
return schedulerType;
|
return schedulerType;
|
||||||
}
|
}
|
||||||
|
|
||||||
static int lxcSetSchedulerParameters(virDomainPtr domain,
|
static int
|
||||||
virTypedParameterPtr params,
|
lxcSetSchedulerParametersFlags(virDomainPtr domain,
|
||||||
int nparams)
|
virTypedParameterPtr params,
|
||||||
|
int nparams,
|
||||||
|
unsigned int flags)
|
||||||
{
|
{
|
||||||
lxc_driver_t *driver = domain->conn->privateData;
|
lxc_driver_t *driver = domain->conn->privateData;
|
||||||
int i;
|
int i;
|
||||||
@ -2171,6 +2173,8 @@ static int lxcSetSchedulerParameters(virDomainPtr domain,
|
|||||||
virDomainObjPtr vm = NULL;
|
virDomainObjPtr vm = NULL;
|
||||||
int ret = -1;
|
int ret = -1;
|
||||||
|
|
||||||
|
virCheckFlags(0, -1);
|
||||||
|
|
||||||
if (driver->cgroup == NULL)
|
if (driver->cgroup == NULL)
|
||||||
return -1;
|
return -1;
|
||||||
|
|
||||||
@ -2222,9 +2226,19 @@ cleanup:
|
|||||||
return ret;
|
return ret;
|
||||||
}
|
}
|
||||||
|
|
||||||
static int lxcGetSchedulerParameters(virDomainPtr domain,
|
static int
|
||||||
virTypedParameterPtr params,
|
lxcSetSchedulerParameters(virDomainPtr domain,
|
||||||
int *nparams)
|
virTypedParameterPtr params,
|
||||||
|
int nparams)
|
||||||
|
{
|
||||||
|
return lxcSetSchedulerParametersFlags(domain, params, nparams, 0);
|
||||||
|
}
|
||||||
|
|
||||||
|
static int
|
||||||
|
lxcGetSchedulerParametersFlags(virDomainPtr domain,
|
||||||
|
virTypedParameterPtr params,
|
||||||
|
int *nparams,
|
||||||
|
unsigned int flags)
|
||||||
{
|
{
|
||||||
lxc_driver_t *driver = domain->conn->privateData;
|
lxc_driver_t *driver = domain->conn->privateData;
|
||||||
virCgroupPtr group = NULL;
|
virCgroupPtr group = NULL;
|
||||||
@ -2232,6 +2246,8 @@ static int lxcGetSchedulerParameters(virDomainPtr domain,
|
|||||||
unsigned long long val;
|
unsigned long long val;
|
||||||
int ret = -1;
|
int ret = -1;
|
||||||
|
|
||||||
|
virCheckFlags(0, -1);
|
||||||
|
|
||||||
if (driver->cgroup == NULL)
|
if (driver->cgroup == NULL)
|
||||||
return -1;
|
return -1;
|
||||||
|
|
||||||
@ -2276,6 +2292,14 @@ cleanup:
|
|||||||
return ret;
|
return ret;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
static int
|
||||||
|
lxcGetSchedulerParameters(virDomainPtr domain,
|
||||||
|
virTypedParameterPtr params,
|
||||||
|
int *nparams)
|
||||||
|
{
|
||||||
|
return lxcGetSchedulerParametersFlags(domain, params, nparams, 0);
|
||||||
|
}
|
||||||
|
|
||||||
#ifdef __linux__
|
#ifdef __linux__
|
||||||
static int
|
static int
|
||||||
lxcDomainInterfaceStats(virDomainPtr dom,
|
lxcDomainInterfaceStats(virDomainPtr dom,
|
||||||
@ -2752,7 +2776,9 @@ static virDriver lxcDriver = {
|
|||||||
.domainSetAutostart = lxcDomainSetAutostart, /* 0.7.0 */
|
.domainSetAutostart = lxcDomainSetAutostart, /* 0.7.0 */
|
||||||
.domainGetSchedulerType = lxcGetSchedulerType, /* 0.5.0 */
|
.domainGetSchedulerType = lxcGetSchedulerType, /* 0.5.0 */
|
||||||
.domainGetSchedulerParameters = lxcGetSchedulerParameters, /* 0.5.0 */
|
.domainGetSchedulerParameters = lxcGetSchedulerParameters, /* 0.5.0 */
|
||||||
|
.domainGetSchedulerParametersFlags = lxcGetSchedulerParametersFlags, /* 0.9.2 */
|
||||||
.domainSetSchedulerParameters = lxcSetSchedulerParameters, /* 0.5.0 */
|
.domainSetSchedulerParameters = lxcSetSchedulerParameters, /* 0.5.0 */
|
||||||
|
.domainSetSchedulerParametersFlags = lxcSetSchedulerParametersFlags, /* 0.9.2 */
|
||||||
.domainInterfaceStats = lxcDomainInterfaceStats, /* 0.7.3 */
|
.domainInterfaceStats = lxcDomainInterfaceStats, /* 0.7.3 */
|
||||||
.nodeGetCellsFreeMemory = nodeGetCellsFreeMemory, /* 0.6.5 */
|
.nodeGetCellsFreeMemory = nodeGetCellsFreeMemory, /* 0.6.5 */
|
||||||
.nodeGetFreeMemory = nodeGetFreeMemory, /* 0.6.5 */
|
.nodeGetFreeMemory = nodeGetFreeMemory, /* 0.6.5 */
|
||||||
|
@ -2636,14 +2636,18 @@ static char *testDomainGetSchedulerType(virDomainPtr domain ATTRIBUTE_UNUSED,
|
|||||||
return type;
|
return type;
|
||||||
}
|
}
|
||||||
|
|
||||||
static int testDomainGetSchedulerParams(virDomainPtr domain,
|
static int
|
||||||
virTypedParameterPtr params,
|
testDomainGetSchedulerParamsFlags(virDomainPtr domain,
|
||||||
int *nparams)
|
virTypedParameterPtr params,
|
||||||
|
int *nparams,
|
||||||
|
unsigned int flags)
|
||||||
{
|
{
|
||||||
testConnPtr privconn = domain->conn->privateData;
|
testConnPtr privconn = domain->conn->privateData;
|
||||||
virDomainObjPtr privdom;
|
virDomainObjPtr privdom;
|
||||||
int ret = -1;
|
int ret = -1;
|
||||||
|
|
||||||
|
virCheckFlags(0, -1);
|
||||||
|
|
||||||
testDriverLock(privconn);
|
testDriverLock(privconn);
|
||||||
privdom = virDomainFindByName(&privconn->domains,
|
privdom = virDomainFindByName(&privconn->domains,
|
||||||
domain->name);
|
domain->name);
|
||||||
@ -2673,15 +2677,26 @@ cleanup:
|
|||||||
return ret;
|
return ret;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
static int
|
||||||
|
testDomainGetSchedulerParams(virDomainPtr domain,
|
||||||
|
virTypedParameterPtr params,
|
||||||
|
int *nparams)
|
||||||
|
{
|
||||||
|
return testDomainGetSchedulerParamsFlags(domain, params, nparams, 0);
|
||||||
|
}
|
||||||
|
|
||||||
static int testDomainSetSchedulerParams(virDomainPtr domain,
|
static int
|
||||||
virTypedParameterPtr params,
|
testDomainSetSchedulerParamsFlags(virDomainPtr domain,
|
||||||
int nparams)
|
virTypedParameterPtr params,
|
||||||
|
int nparams,
|
||||||
|
unsigned int flags)
|
||||||
{
|
{
|
||||||
testConnPtr privconn = domain->conn->privateData;
|
testConnPtr privconn = domain->conn->privateData;
|
||||||
virDomainObjPtr privdom;
|
virDomainObjPtr privdom;
|
||||||
int ret = -1, i;
|
int ret = -1, i;
|
||||||
|
|
||||||
|
virCheckFlags(0, -1);
|
||||||
|
|
||||||
testDriverLock(privconn);
|
testDriverLock(privconn);
|
||||||
privdom = virDomainFindByName(&privconn->domains,
|
privdom = virDomainFindByName(&privconn->domains,
|
||||||
domain->name);
|
domain->name);
|
||||||
@ -2713,6 +2728,14 @@ cleanup:
|
|||||||
return ret;
|
return ret;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
static int
|
||||||
|
testDomainSetSchedulerParams(virDomainPtr domain,
|
||||||
|
virTypedParameterPtr params,
|
||||||
|
int nparams)
|
||||||
|
{
|
||||||
|
return testDomainSetSchedulerParamsFlags(domain, params, nparams, 0);
|
||||||
|
}
|
||||||
|
|
||||||
static int testDomainBlockStats(virDomainPtr domain,
|
static int testDomainBlockStats(virDomainPtr domain,
|
||||||
const char *path,
|
const char *path,
|
||||||
struct _virDomainBlockStats *stats)
|
struct _virDomainBlockStats *stats)
|
||||||
@ -5454,7 +5477,9 @@ static virDriver testDriver = {
|
|||||||
.domainSetAutostart = testDomainSetAutostart, /* 0.3.2 */
|
.domainSetAutostart = testDomainSetAutostart, /* 0.3.2 */
|
||||||
.domainGetSchedulerType = testDomainGetSchedulerType, /* 0.3.2 */
|
.domainGetSchedulerType = testDomainGetSchedulerType, /* 0.3.2 */
|
||||||
.domainGetSchedulerParameters = testDomainGetSchedulerParams, /* 0.3.2 */
|
.domainGetSchedulerParameters = testDomainGetSchedulerParams, /* 0.3.2 */
|
||||||
|
.domainGetSchedulerParametersFlags = testDomainGetSchedulerParamsFlags, /* 0.9.2 */
|
||||||
.domainSetSchedulerParameters = testDomainSetSchedulerParams, /* 0.3.2 */
|
.domainSetSchedulerParameters = testDomainSetSchedulerParams, /* 0.3.2 */
|
||||||
|
.domainSetSchedulerParametersFlags = testDomainSetSchedulerParamsFlags, /* 0.9.2 */
|
||||||
.domainBlockStats = testDomainBlockStats, /* 0.7.0 */
|
.domainBlockStats = testDomainBlockStats, /* 0.7.0 */
|
||||||
.domainInterfaceStats = testDomainInterfaceStats, /* 0.7.0 */
|
.domainInterfaceStats = testDomainInterfaceStats, /* 0.7.0 */
|
||||||
.nodeGetCellsFreeMemory = testNodeGetCellsFreeMemory, /* 0.4.2 */
|
.nodeGetCellsFreeMemory = testNodeGetCellsFreeMemory, /* 0.4.2 */
|
||||||
|
@ -1676,13 +1676,16 @@ xenUnifiedDomainGetSchedulerType (virDomainPtr dom, int *nparams)
|
|||||||
}
|
}
|
||||||
|
|
||||||
static int
|
static int
|
||||||
xenUnifiedDomainGetSchedulerParameters (virDomainPtr dom,
|
xenUnifiedDomainGetSchedulerParametersFlags(virDomainPtr dom,
|
||||||
virTypedParameterPtr params,
|
virTypedParameterPtr params,
|
||||||
int *nparams)
|
int *nparams,
|
||||||
|
unsigned int flags)
|
||||||
{
|
{
|
||||||
GET_PRIVATE(dom->conn);
|
GET_PRIVATE(dom->conn);
|
||||||
int i, ret;
|
int i, ret;
|
||||||
|
|
||||||
|
virCheckFlags(0, -1);
|
||||||
|
|
||||||
for (i = 0; i < XEN_UNIFIED_NR_DRIVERS; ++i) {
|
for (i = 0; i < XEN_UNIFIED_NR_DRIVERS; ++i) {
|
||||||
if (priv->opened[i] && drivers[i]->domainGetSchedulerParameters) {
|
if (priv->opened[i] && drivers[i]->domainGetSchedulerParameters) {
|
||||||
ret = drivers[i]->domainGetSchedulerParameters(dom, params, nparams);
|
ret = drivers[i]->domainGetSchedulerParameters(dom, params, nparams);
|
||||||
@ -1694,13 +1697,25 @@ xenUnifiedDomainGetSchedulerParameters (virDomainPtr dom,
|
|||||||
}
|
}
|
||||||
|
|
||||||
static int
|
static int
|
||||||
xenUnifiedDomainSetSchedulerParameters (virDomainPtr dom,
|
xenUnifiedDomainGetSchedulerParameters(virDomainPtr dom,
|
||||||
virTypedParameterPtr params,
|
virTypedParameterPtr params,
|
||||||
int nparams)
|
int *nparams)
|
||||||
|
{
|
||||||
|
return xenUnifiedDomainGetSchedulerParametersFlags(dom, params,
|
||||||
|
nparams, 0);
|
||||||
|
}
|
||||||
|
|
||||||
|
static int
|
||||||
|
xenUnifiedDomainSetSchedulerParametersFlags(virDomainPtr dom,
|
||||||
|
virTypedParameterPtr params,
|
||||||
|
int nparams,
|
||||||
|
unsigned int flags)
|
||||||
{
|
{
|
||||||
GET_PRIVATE(dom->conn);
|
GET_PRIVATE(dom->conn);
|
||||||
int i, ret;
|
int i, ret;
|
||||||
|
|
||||||
|
virCheckFlags(0, -1);
|
||||||
|
|
||||||
/* do the hypervisor call last to get better error */
|
/* do the hypervisor call last to get better error */
|
||||||
for (i = XEN_UNIFIED_NR_DRIVERS - 1; i >= 0; i--) {
|
for (i = XEN_UNIFIED_NR_DRIVERS - 1; i >= 0; i--) {
|
||||||
if (priv->opened[i] && drivers[i]->domainSetSchedulerParameters) {
|
if (priv->opened[i] && drivers[i]->domainSetSchedulerParameters) {
|
||||||
@ -1713,6 +1728,15 @@ xenUnifiedDomainSetSchedulerParameters (virDomainPtr dom,
|
|||||||
return(-1);
|
return(-1);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
static int
|
||||||
|
xenUnifiedDomainSetSchedulerParameters(virDomainPtr dom,
|
||||||
|
virTypedParameterPtr params,
|
||||||
|
int nparams)
|
||||||
|
{
|
||||||
|
return xenUnifiedDomainSetSchedulerParametersFlags(dom, params,
|
||||||
|
nparams, 0);
|
||||||
|
}
|
||||||
|
|
||||||
static int
|
static int
|
||||||
xenUnifiedDomainBlockStats (virDomainPtr dom, const char *path,
|
xenUnifiedDomainBlockStats (virDomainPtr dom, const char *path,
|
||||||
struct _virDomainBlockStats *stats)
|
struct _virDomainBlockStats *stats)
|
||||||
@ -2197,7 +2221,9 @@ static virDriver xenUnifiedDriver = {
|
|||||||
.domainSetAutostart = xenUnifiedDomainSetAutostart, /* 0.4.4 */
|
.domainSetAutostart = xenUnifiedDomainSetAutostart, /* 0.4.4 */
|
||||||
.domainGetSchedulerType = xenUnifiedDomainGetSchedulerType, /* 0.2.3 */
|
.domainGetSchedulerType = xenUnifiedDomainGetSchedulerType, /* 0.2.3 */
|
||||||
.domainGetSchedulerParameters = xenUnifiedDomainGetSchedulerParameters, /* 0.2.3 */
|
.domainGetSchedulerParameters = xenUnifiedDomainGetSchedulerParameters, /* 0.2.3 */
|
||||||
|
.domainGetSchedulerParametersFlags = xenUnifiedDomainGetSchedulerParametersFlags, /* 0.9.2 */
|
||||||
.domainSetSchedulerParameters = xenUnifiedDomainSetSchedulerParameters, /* 0.2.3 */
|
.domainSetSchedulerParameters = xenUnifiedDomainSetSchedulerParameters, /* 0.2.3 */
|
||||||
|
.domainSetSchedulerParametersFlags = xenUnifiedDomainSetSchedulerParametersFlags, /* 0.9.2 */
|
||||||
.domainMigratePrepare = xenUnifiedDomainMigratePrepare, /* 0.3.2 */
|
.domainMigratePrepare = xenUnifiedDomainMigratePrepare, /* 0.3.2 */
|
||||||
.domainMigratePerform = xenUnifiedDomainMigratePerform, /* 0.3.2 */
|
.domainMigratePerform = xenUnifiedDomainMigratePerform, /* 0.3.2 */
|
||||||
.domainMigrateFinish = xenUnifiedDomainMigrateFinish, /* 0.3.2 */
|
.domainMigrateFinish = xenUnifiedDomainMigrateFinish, /* 0.3.2 */
|
||||||
|
Loading…
Reference in New Issue
Block a user