Whamcloud - gitweb
LU-715 lov: fix procfs reporting for qos values
[fs/lustre-release.git] / lustre / lov / lproc_lov.c
index d9d3d91..c831e98 100644 (file)
@@ -213,7 +213,7 @@ static int lov_rd_qos_priofree(char *page, char **start, off_t off, int count,
         lov = &dev->u.lov;
         *eof = 1;
         return snprintf(page, count, "%d%%\n", 
-                        (lov->lov_qos.lq_prio_free * 100) >> 8);
+                        (lov->lov_qos.lq_prio_free * 100 + 255) >> 8);
 }
 
 static int lov_wr_qos_priofree(struct file *file, const char *buffer,
@@ -247,7 +247,7 @@ static int lov_rd_qos_thresholdrr(char *page, char **start, off_t off,
         lov = &dev->u.lov;
         *eof = 1;
         return snprintf(page, count, "%d%%\n",
-                        (lov->lov_qos.lq_threshold_rr * 100) >> 8);
+                        (lov->lov_qos.lq_threshold_rr * 100 + 255) >> 8);
 }
 
 static int lov_wr_qos_thresholdrr(struct file *file, const char *buffer,