From: Chen Hanxiao <chenhanxiao@xxxxxxxxxxxxxx> Values for cgroup may change in the future kernels. We should not hard-coded it. Leave this job to kernel, who will take care of them. Signed-off-by: Chen Hanxiao <chenhanxiao@xxxxxxxxxxxxxx> --- src/util/vircgroup.c | 14 -------------- 1 file changed, 14 deletions(-) diff --git a/src/util/vircgroup.c b/src/util/vircgroup.c index a98bd63..b164dca 100644 --- a/src/util/vircgroup.c +++ b/src/util/vircgroup.c @@ -1797,13 +1797,6 @@ virCgroupPathOfController(virCgroupPtr group, int virCgroupSetBlkioWeight(virCgroupPtr group, unsigned int weight) { - if (weight > 1000 || weight < 100) { - virReportError(VIR_ERR_INVALID_ARG, - _("weight '%u' must be in range (100, 1000)"), - weight); - return -1; - } - return virCgroupSetValueU64(group, VIR_CGROUP_CONTROLLER_BLKIO, "blkio.weight", @@ -1855,13 +1848,6 @@ virCgroupSetBlkioDeviceWeight(virCgroupPtr group, struct stat sb; int ret; - if (weight && (weight > 1000 || weight < 100)) { - virReportError(VIR_ERR_INVALID_ARG, - _("weight '%u' must be in range (100, 1000)"), - weight); - return -1; - } - if (stat(path, &sb) < 0) { virReportSystemError(errno, _("Path '%s' is not accessible"), -- 1.8.2.1 -- libvir-list mailing list libvir-list@xxxxxxxxxx https://www.redhat.com/mailman/listinfo/libvir-list