提交 bcdbab89 编写于 作者: P Peter Krempa

qemu: driver: Make name of QEMU_SET_MEM_PARAMETER more universal

Use a VIR_ prefix even when it's a local helper macro. It will be later
synced with the LXC implementation.
上级 9a6e47c4
......@@ -9176,7 +9176,7 @@ qemuDomainSetMemoryParameters(virDomainPtr dom,
}
}
#define QEMU_SET_MEM_PARAMETER(FUNC, VALUE) \
#define VIR_SET_MEM_PARAMETER(FUNC, VALUE) \
if (set_ ## VALUE) { \
if (def) { \
if ((rc = FUNC(priv->cgroup, VALUE)) < 0) \
......@@ -9189,21 +9189,21 @@ qemuDomainSetMemoryParameters(virDomainPtr dom,
}
/* Soft limit doesn't clash with the others */
QEMU_SET_MEM_PARAMETER(virCgroupSetMemorySoftLimit, soft_limit);
VIR_SET_MEM_PARAMETER(virCgroupSetMemorySoftLimit, soft_limit);
/* set hard limit before swap hard limit if decreasing it */
if (def && def->mem.hard_limit > hard_limit) {
QEMU_SET_MEM_PARAMETER(virCgroupSetMemoryHardLimit, hard_limit);
VIR_SET_MEM_PARAMETER(virCgroupSetMemoryHardLimit, hard_limit);
/* inhibit changing the limit a second time */
set_hard_limit = false;
}
QEMU_SET_MEM_PARAMETER(virCgroupSetMemSwapHardLimit, swap_hard_limit);
VIR_SET_MEM_PARAMETER(virCgroupSetMemSwapHardLimit, swap_hard_limit);
/* otherwise increase it after swap hard limit */
QEMU_SET_MEM_PARAMETER(virCgroupSetMemoryHardLimit, hard_limit);
VIR_SET_MEM_PARAMETER(virCgroupSetMemoryHardLimit, hard_limit);
#undef QEMU_SET_MEM_PARAMETER
#undef VIR_SET_MEM_PARAMETER
if (def &&
virDomainSaveStatus(driver->xmlopt, cfg->stateDir, vm, driver->caps) < 0)
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册