mirror of
https://gitlab.com/libvirt/libvirt.git
synced 2024-07-31 05:57:16 +00:00
Rename VIR_DOMAIN_SWAP_HARD_LIMIT to VIR_DOMAIN_MEMORY_SWAP_HARD_LIMIT
To get them under the common VIR_DOMAIN_MEMORY_* prefix.
This commit is contained in:
parent
e05cdac855
commit
916f95b7aa
@ -722,13 +722,13 @@ typedef enum {
|
|||||||
#define VIR_DOMAIN_MEMORY_MIN_GUARANTEE "min_guarantee"
|
#define VIR_DOMAIN_MEMORY_MIN_GUARANTEE "min_guarantee"
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* VIR_DOMAIN_SWAP_HARD_LIMIT:
|
* VIR_DOMAIN_MEMORY_SWAP_HARD_LIMIT:
|
||||||
*
|
*
|
||||||
* Macro for the swap tunable swap_hard_limit: it represents the maximum swap
|
* Macro for the swap tunable swap_hard_limit: it represents the maximum swap
|
||||||
* the guest can use.
|
* the guest can use.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#define VIR_DOMAIN_SWAP_HARD_LIMIT "swap_hard_limit"
|
#define VIR_DOMAIN_MEMORY_SWAP_HARD_LIMIT "swap_hard_limit"
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* virDomainMemoryParameter:
|
* virDomainMemoryParameter:
|
||||||
|
@ -746,7 +746,7 @@ static int lxcDomainSetMemoryParameters(virDomainPtr dom,
|
|||||||
_("unable to set memory soft_limit tunable"));
|
_("unable to set memory soft_limit tunable"));
|
||||||
ret = -1;
|
ret = -1;
|
||||||
}
|
}
|
||||||
} else if (STREQ(param->field, VIR_DOMAIN_SWAP_HARD_LIMIT)) {
|
} else if (STREQ(param->field, VIR_DOMAIN_MEMORY_SWAP_HARD_LIMIT)) {
|
||||||
int rc;
|
int rc;
|
||||||
if (param->type != VIR_DOMAIN_MEMORY_PARAM_ULLONG) {
|
if (param->type != VIR_DOMAIN_MEMORY_PARAM_ULLONG) {
|
||||||
lxcError(VIR_ERR_INVALID_ARG, "%s",
|
lxcError(VIR_ERR_INVALID_ARG, "%s",
|
||||||
@ -873,7 +873,7 @@ static int lxcDomainGetMemoryParameters(virDomainPtr dom,
|
|||||||
ret = -1;
|
ret = -1;
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
if (virStrcpyStatic(param->field, VIR_DOMAIN_SWAP_HARD_LIMIT) == NULL) {
|
if (virStrcpyStatic(param->field, VIR_DOMAIN_MEMORY_SWAP_HARD_LIMIT) == NULL) {
|
||||||
lxcError(VIR_ERR_INTERNAL_ERROR,
|
lxcError(VIR_ERR_INTERNAL_ERROR,
|
||||||
"%s", _("Field swap hard limit too long for destination"));
|
"%s", _("Field swap hard limit too long for destination"));
|
||||||
ret = -1;
|
ret = -1;
|
||||||
|
@ -9594,7 +9594,7 @@ static int qemuDomainSetMemoryParameters(virDomainPtr dom,
|
|||||||
_("unable to set memory soft_limit tunable"));
|
_("unable to set memory soft_limit tunable"));
|
||||||
ret = -1;
|
ret = -1;
|
||||||
}
|
}
|
||||||
} else if (STREQ(param->field, VIR_DOMAIN_SWAP_HARD_LIMIT)) {
|
} else if (STREQ(param->field, VIR_DOMAIN_MEMORY_SWAP_HARD_LIMIT)) {
|
||||||
int rc;
|
int rc;
|
||||||
if (param->type != VIR_DOMAIN_MEMORY_PARAM_ULLONG) {
|
if (param->type != VIR_DOMAIN_MEMORY_PARAM_ULLONG) {
|
||||||
qemuReportError(VIR_ERR_INVALID_ARG, "%s",
|
qemuReportError(VIR_ERR_INVALID_ARG, "%s",
|
||||||
@ -9726,7 +9726,7 @@ static int qemuDomainGetMemoryParameters(virDomainPtr dom,
|
|||||||
ret = -1;
|
ret = -1;
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
if (virStrcpyStatic(param->field, VIR_DOMAIN_SWAP_HARD_LIMIT) == NULL) {
|
if (virStrcpyStatic(param->field, VIR_DOMAIN_MEMORY_SWAP_HARD_LIMIT) == NULL) {
|
||||||
qemuReportError(VIR_ERR_INTERNAL_ERROR,
|
qemuReportError(VIR_ERR_INTERNAL_ERROR,
|
||||||
"%s", _("Field swap hard limit too long for destination"));
|
"%s", _("Field swap hard limit too long for destination"));
|
||||||
ret = -1;
|
ret = -1;
|
||||||
|
@ -2894,7 +2894,7 @@ static const vshCmdOptDef opts_memtune[] = {
|
|||||||
N_("Max memory in kilobytes")},
|
N_("Max memory in kilobytes")},
|
||||||
{VIR_DOMAIN_MEMORY_SOFT_LIMIT, VSH_OT_STRING, VSH_OFLAG_NONE,
|
{VIR_DOMAIN_MEMORY_SOFT_LIMIT, VSH_OT_STRING, VSH_OFLAG_NONE,
|
||||||
N_("Memory during contention in kilobytes")},
|
N_("Memory during contention in kilobytes")},
|
||||||
{VIR_DOMAIN_SWAP_HARD_LIMIT, VSH_OT_STRING, VSH_OFLAG_NONE,
|
{VIR_DOMAIN_MEMORY_SWAP_HARD_LIMIT, VSH_OT_STRING, VSH_OFLAG_NONE,
|
||||||
N_("Max swap in kilobytes")},
|
N_("Max swap in kilobytes")},
|
||||||
{VIR_DOMAIN_MEMORY_MIN_GUARANTEE, VSH_OT_STRING, VSH_OFLAG_NONE,
|
{VIR_DOMAIN_MEMORY_MIN_GUARANTEE, VSH_OT_STRING, VSH_OFLAG_NONE,
|
||||||
N_("Min guaranteed memory in kilobytes")},
|
N_("Min guaranteed memory in kilobytes")},
|
||||||
@ -2928,7 +2928,7 @@ cmdMemtune(vshControl * ctl, const vshCmd * cmd)
|
|||||||
nparams++;
|
nparams++;
|
||||||
|
|
||||||
swap_hard_limit =
|
swap_hard_limit =
|
||||||
vshCommandOptInt(cmd, VIR_DOMAIN_SWAP_HARD_LIMIT,
|
vshCommandOptInt(cmd, VIR_DOMAIN_MEMORY_SWAP_HARD_LIMIT,
|
||||||
&swap_hard_limit);
|
&swap_hard_limit);
|
||||||
if (swap_hard_limit)
|
if (swap_hard_limit)
|
||||||
nparams++;
|
nparams++;
|
||||||
@ -3015,7 +3015,7 @@ cmdMemtune(vshControl * ctl, const vshCmd * cmd)
|
|||||||
hard_limit = 0;
|
hard_limit = 0;
|
||||||
} else if (swap_hard_limit) {
|
} else if (swap_hard_limit) {
|
||||||
temp->value.ul = swap_hard_limit;
|
temp->value.ul = swap_hard_limit;
|
||||||
strncpy(temp->field, VIR_DOMAIN_SWAP_HARD_LIMIT,
|
strncpy(temp->field, VIR_DOMAIN_MEMORY_SWAP_HARD_LIMIT,
|
||||||
sizeof(temp->field));
|
sizeof(temp->field));
|
||||||
swap_hard_limit = 0;
|
swap_hard_limit = 0;
|
||||||
} else if (min_guarantee) {
|
} else if (min_guarantee) {
|
||||||
|
Loading…
Reference in New Issue
Block a user