Whamcloud - gitweb
LU-715 lov: fix procfs reporting for qos values
authorMatt Ezell <ezell@nics.utk.edu>
Mon, 17 Oct 2011 14:43:22 +0000 (10:43 -0400)
committerOleg Drokin <green@whamcloud.com>
Fri, 28 Oct 2011 16:58:43 +0000 (12:58 -0400)
commit0d0b8d65d84c644290f938a43fdcb0d68015c519
tree20134758c0325b4e3b095c0cc04ecfdf570a8537
parenta7a34bb4aa0c2db3ece1f51512f7dee645bb8903
LU-715 lov: fix procfs reporting for qos values

When writing to
/proc/fs/lustre/lov/<fsname>-mdtlov/{qos_prio_free,qos_threshold_rr},
the values read back are often one less than the values written.
This happens because internally the value is stored as a number from
0-255 but accessed by the user with 0-100. Integer truncation in the
storage and retrieval stages causes this to often show lower. Adding
255 to an internal step causes the bit-shift to "round up".

Signed-off-by: Matt Ezell <ezell@nics.utk.edu>
Change-Id: I9050aadb55bfa82d14b94a78e399d315249ac48f
Reviewed-on: http://review.whamcloud.com/1532
Tested-by: Hudson
Reviewed-by: Andreas Dilger <adilger@whamcloud.com>
Tested-by: Maloo <whamcloud.maloo@gmail.com>
Reviewed-by: Oleg Drokin <green@whamcloud.com>
lustre/lov/lproc_lov.c