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(a)redhat.com>
---
src/lxc/lxc_driver.c | 14 --------------
src/qemu/qemu_driver.c | 14 --------------
tools/virsh-domain.c | 2 +-
tools/virsh.pod | 5 +----
4 files changed, 2 insertions(+), 33 deletions(-)
diff --git a/src/lxc/lxc_driver.c b/src/lxc/lxc_driver.c
index ecd9053..9e12ecc 100644
--- a/src/lxc/lxc_driver.c
+++ b/src/lxc/lxc_driver.c
@@ -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) ||
diff --git a/src/qemu/qemu_driver.c b/src/qemu/qemu_driver.c
index 06d3f53..be622af 100644
--- a/src/qemu/qemu_driver.c
+++ b/src/qemu/qemu_driver.c
@@ -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) ||
diff --git a/tools/virsh-domain.c b/tools/virsh-domain.c
index 6fcfd9c..ad68aab 100644
--- a/tools/virsh-domain.c
+++ b/tools/virsh-domain.c
@@ -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,
diff --git a/tools/virsh.pod b/tools/virsh.pod
index 849ae31..f387ab7 100644
--- a/tools/virsh.pod
+++ b/tools/virsh.pod
@@ -1824,13 +1824,10 @@ Specifying -1 as a value for these limits is interpreted as
unlimited.
[[I<--config>] [I<--live>] | [I<--current>]]
Display or set the blkio parameters. QEMU/KVM supports I<--weight>.
-I<--weight> is in range [100, 1000]. After kernel 2.6.39, the value
-could be in the range [10, 1000].
B<device-weights> is a single string listing one or more device/weight
pairs, in the format of /path/to/device,weight,/path/to/device,weight.
-Each weight is in the range [100, 1000], [10, 1000] after kernel 2.6.39,
-or the value 0 to remove that device from per-device listings.
+Specifying 0 for any weight removes that device from per-device listings.
Only the devices listed in the string are modified;
any existing per-device weights for other devices remain unchanged.
--
2.0.2