mirror of
https://gitlab.com/libvirt/libvirt.git
synced 2025-01-03 03:25:20 +00:00
remove range checking for blkiotune weight
This was changed before: https://www.redhat.com/archives/libvir-list/2013-October/msg00525.html but not everywhere in the code. Resolves: https://bugzilla.redhat.com/show_bug.cgi?id=1100769 Signed-off-by: Martin Kletzander <mkletzan@redhat.com>
This commit is contained in:
parent
d704e69858
commit
9318121db8
@ -2559,13 +2559,6 @@ lxcDomainSetBlkioParameters(virDomainPtr dom,
|
||||
virTypedParameterPtr param = ¶ms[i];
|
||||
|
||||
if (STREQ(param->field, VIR_DOMAIN_BLKIO_WEIGHT)) {
|
||||
if (params[i].value.ui > 1000 || params[i].value.ui < 100) {
|
||||
virReportError(VIR_ERR_INVALID_ARG, "%s",
|
||||
_("out of blkio weight range."));
|
||||
ret = -1;
|
||||
continue;
|
||||
}
|
||||
|
||||
if (virCgroupSetBlkioWeight(priv->cgroup, params[i].value.ui) < 0)
|
||||
ret = -1;
|
||||
} else if (STREQ(param->field, VIR_DOMAIN_BLKIO_DEVICE_WEIGHT) ||
|
||||
@ -2660,13 +2653,6 @@ lxcDomainSetBlkioParameters(virDomainPtr dom,
|
||||
virTypedParameterPtr param = ¶ms[i];
|
||||
|
||||
if (STREQ(param->field, VIR_DOMAIN_BLKIO_WEIGHT)) {
|
||||
if (params[i].value.ui > 1000 || params[i].value.ui < 100) {
|
||||
virReportError(VIR_ERR_INVALID_ARG, "%s",
|
||||
_("out of blkio weight range."));
|
||||
ret = -1;
|
||||
continue;
|
||||
}
|
||||
|
||||
persistentDef->blkio.weight = params[i].value.ui;
|
||||
} else if (STREQ(param->field, VIR_DOMAIN_BLKIO_DEVICE_WEIGHT) ||
|
||||
STREQ(param->field, VIR_DOMAIN_BLKIO_DEVICE_READ_IOPS) ||
|
||||
|
@ -7819,13 +7819,6 @@ qemuDomainSetBlkioParameters(virDomainPtr dom,
|
||||
virTypedParameterPtr param = ¶ms[i];
|
||||
|
||||
if (STREQ(param->field, VIR_DOMAIN_BLKIO_WEIGHT)) {
|
||||
if (params[i].value.ui > 1000 || params[i].value.ui < 100) {
|
||||
virReportError(VIR_ERR_INVALID_ARG, "%s",
|
||||
_("out of blkio weight range."));
|
||||
ret = -1;
|
||||
continue;
|
||||
}
|
||||
|
||||
if (virCgroupSetBlkioWeight(priv->cgroup, params[i].value.ui) < 0)
|
||||
ret = -1;
|
||||
} else if (STREQ(param->field, VIR_DOMAIN_BLKIO_DEVICE_WEIGHT) ||
|
||||
@ -7920,13 +7913,6 @@ qemuDomainSetBlkioParameters(virDomainPtr dom,
|
||||
virTypedParameterPtr param = ¶ms[i];
|
||||
|
||||
if (STREQ(param->field, VIR_DOMAIN_BLKIO_WEIGHT)) {
|
||||
if (params[i].value.ui > 1000 || params[i].value.ui < 100) {
|
||||
virReportError(VIR_ERR_INVALID_ARG, "%s",
|
||||
_("out of blkio weight range."));
|
||||
ret = -1;
|
||||
continue;
|
||||
}
|
||||
|
||||
persistentDef->blkio.weight = params[i].value.ui;
|
||||
} else if (STREQ(param->field, VIR_DOMAIN_BLKIO_DEVICE_WEIGHT) ||
|
||||
STREQ(param->field, VIR_DOMAIN_BLKIO_DEVICE_READ_IOPS) ||
|
||||
|
@ -1255,7 +1255,7 @@ static const vshCmdOptDef opts_blkiotune[] = {
|
||||
},
|
||||
{.name = "weight",
|
||||
.type = VSH_OT_INT,
|
||||
.help = N_("IO Weight in range [100, 1000]")
|
||||
.help = N_("IO Weight")
|
||||
},
|
||||
{.name = "device-weights",
|
||||
.type = VSH_OT_STRING,
|
||||
|
Loading…
Reference in New Issue
Block a user