Whamcloud - gitweb
LU-715 lov: fix procfs reporting for qos values
authorMatt Ezell <ezell@nics.utk.edu>
Thu, 13 Oct 2011 20:39:04 +0000 (16:39 -0400)
committerJohann Lombardi <johann@whamcloud.com>
Mon, 12 Dec 2011 23:12:38 +0000 (18:12 -0500)
commitd07942a89ba92fa20cf0364900a1d52d94784edc
treece98df6f5c53c72e36ca058e411599a526917b21
parent218a85228a62a3f2f0359562389fca8d898d20ac
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: I3bb1bb4b048d40eb3882c7cb22799320f90496c7
Reviewed-on: http://review.whamcloud.com/1522
Tested-by: Hudson
Tested-by: Maloo <whamcloud.maloo@gmail.com>
Reviewed-by: Andreas Dilger <adilger@whamcloud.com>
lustre/lov/lproc_lov.c