Whamcloud - gitweb
LU-10171 headers: define pct(a,b) once
[fs/lustre-release.git] / lustre / osd-ldiskfs / osd_lproc.c
index 89cdfee..85b2055 100644 (file)
@@ -78,8 +78,6 @@ void osd_brw_stats_update(struct osd_device *osd, struct osd_iobuf *iobuf)
         lprocfs_oh_tally(&s->hist[BRW_R_DISCONT_BLOCKS+rw], discont_blocks);
 }
 
-#define pct(a, b) (b ? a * 100 / b : 0)
-
 static void display_brw_stats(struct seq_file *seq, char *name, char *units,
         struct obd_histogram *read, struct obd_histogram *write, int scale)
 {
@@ -109,7 +107,7 @@ static void display_brw_stats(struct seq_file *seq, char *name, char *units,
                 else
                         seq_printf(seq, "%uM", scale << (i-20));
 
-                seq_printf(seq, ":\t\t%10lu %3lu %3lu   | %4lu %3lu %3lu\n",
+               seq_printf(seq, ":\t\t%10lu %3u %3u   | %4lu %3u %3u\n",
                            r, pct(r, read_tot), pct(read_cum, read_tot),
                            w, pct(w, write_tot), pct(write_cum, write_tot));
 
@@ -158,8 +156,6 @@ static void brw_stats_show(struct seq_file *seq, struct brw_stats *brw_stats)
                           &brw_stats->hist[BRW_W_DISK_IOSIZE], 1);
 }
 
-#undef pct
-
 static int osd_brw_stats_seq_show(struct seq_file *seq, void *v)
 {
         struct osd_device *osd = seq->private;