[libvirt] [PATCH 2/2]blkio: change the minimum weight according to kernel version

Eric Blake eblake at redhat.com
Wed Oct 9 03:52:23 UTC 2013


On 10/08/2013 02:38 AM, Chen Hanxiao wrote:
> From: Chen Hanxiao <chenhanxiao at cn.fujitsu.com>
> 
> kernel had changed the minimum weight of device blkio from
> 100 to 10 in commit df457f845e5449be2e7d96668791f789b3770ac7.
> So we should to use new blkio weight range after 2.6.39.

Why not do it unconditionally, and then just have graceful error
detection when on older kernels when the input is rejected by the kernel
as out of range?  That would be feature-based instead of version-check
based, which makes it more reliable even if the feature of the kernel is
backported to something that uname reports as having an older version
number.

> 
> libvirt should follow kernel according to
> kernel version.
> 
> Signed-off-by: Gao feng <gaofeng at cn.fujitsu.com>
> Signed-off-by: Chen Hanxiao <chenhanxiao at cn.fujitsu.com>
> ---
>  src/util/vircgroup.c | 44 +++++++++++++++++++++++++++++++++-----------
>  1 file changed, 33 insertions(+), 11 deletions(-)

Incomplete.  You also need to touch virsh.pod and probably
formatdomain.html.in to document the larger range, and mention that
different connections may have different ranges (due to different kernel
versions on the other ends of those two connections).

-- 
Eric Blake   eblake redhat com    +1-919-301-3266
Libvirt virtualization library http://libvirt.org

-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 621 bytes
Desc: OpenPGP digital signature
URL: <http://listman.redhat.com/archives/libvir-list/attachments/20131008/4850095a/attachment-0001.sig>


More information about the libvir-list mailing list