we can also avoid the error message like this after using this patch.
..........
[error|winserver86|7|events|xenops] Failed to parse ionice result: none: prio 0
..........


>Hi ALL,
>
>i have install the xen-xapi on centos 6, and may be we can support the ionice 
>back to none.
>please check an review.
>
>
>From c1f5cf58a9d5a24cb98710aab142fc663807dad3 Mon Sep 17 00:00:00 2001
>From: root <y...@winhong.com>
>Date: Fri, 15 May 2015 19:57:06 -0400
>Subject: [PATCH] Add default none qos_scheduler for ionice
>
>The ionice has support 4 scheduling classes
>"The scheduling class. 0 for none, 1 for real time, 2 for best-effort, 3 for 
>idle."
>
>Signed-off-by: Yi Li <y...@winhong.com>
>---
> ocaml/xapi/xapi_xenops.ml        | 3 ++-
> ocaml/xenops/ionice.ml           | 3 +++
> ocaml/xenops/xenops_interface.ml | 1 +
> 3 files changed, 6 insertions(+), 1 deletion(-)
>
>diff --git a/ocaml/xapi/xapi_xenops.ml b/ocaml/xapi/xapi_xenops.ml
>index 47c6737..d11c91e 100644
>--- a/ocaml/xapi/xapi_xenops.ml
>+++ b/ocaml/xapi/xapi_xenops.ml
>@@ -360,8 +360,9 @@ module MD = struct
>                               | "rt" | "real-time" -> RealTime (qos_class 
> params)
>                               | "idle"             -> Idle
>                               | "best-effort"      -> BestEffort (qos_class 
> params)
>+                              | "none"             -> Default (qos_class 
>params)
>                               | _                  ->
>-                                      warn "Unknown VBD QoS scheduler (try 
>'real-time' 'idle' 'best-effort')";
>+                                      warn "Unknown VBD QoS scheduler (try 
>'real-time' 'idle' 'best-effort' 'none')";
>                                       BestEffort (qos_class params)
>                       with Not_found ->
>                               BestEffort (qos_class params) in
>diff --git a/ocaml/xenops/ionice.ml b/ocaml/xenops/ionice.ml
>index 37ebd2a..f235e53 100644
>--- a/ocaml/xenops/ionice.ml
>+++ b/ocaml/xenops/ionice.ml
>@@ -28,6 +28,7 @@ let to_class_param =
>               | RealTime x   -> 1, (to_param x)
>               | Idle         -> 3, (to_param Lowest)
>               | BestEffort x -> 2, (to_param x)
>+              | Default x -> 0, (to_param x)
> 
> let of_class_param_exn cls param =
>       let param = match param with
>@@ -44,6 +45,8 @@ let of_class_param_exn cls param =
>               | "1" -> RealTime param
>               | "best-effort"
>               | "2" -> BestEffort param
>+              | "none"
>+              | "0" ->Default param   
>               | _ -> raise Not_found (* caught below *)
> 
> exception Parse_failed of string
>diff --git a/ocaml/xenops/xenops_interface.ml 
>b/ocaml/xenops/xenops_interface.ml
>index abcf1d2..6f894a1 100644
>--- a/ocaml/xenops/xenops_interface.ml
>+++ b/ocaml/xenops/xenops_interface.ml
>@@ -231,6 +231,7 @@ module Vbd = struct
>               | RealTime of qos_class
>               | Idle
>               | BestEffort of qos_class
>+              | Default of qos_class
>       type qos =
>               | Ionice of qos_scheduler
> 
>-- 
>1.7.12.4
_______________________________________________
Xen-api mailing list
Xen-api@lists.xen.org
http://lists.xen.org/cgi-bin/mailman/listinfo/xen-api

Reply via email to