Whamcloud - gitweb
git://git.whamcloud.com
/
fs
/
lustre-release.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
| inline |
side by side
LU-10171 headers: define pct(a,b) once
[fs/lustre-release.git]
/
lustre
/
osc
/
lproc_osc.c
diff --git
a/lustre/osc/lproc_osc.c
b/lustre/osc/lproc_osc.c
index
2a4dd88
..
4289266
100644
(file)
--- a/
lustre/osc/lproc_osc.c
+++ b/
lustre/osc/lproc_osc.c
@@
-781,8
+781,6
@@
struct lprocfs_vars lprocfs_osc_obd_vars[] = {
{ NULL }
};
-#define pct(a,b) (b ? a * 100 / b : 0)
-
static int osc_rpc_stats_seq_show(struct seq_file *seq, void *v)
{
struct timespec64 now;
@@
-821,7
+819,7
@@
static int osc_rpc_stats_seq_show(struct seq_file *seq, void *v)
read_cum += r;
write_cum += w;
- seq_printf(seq, "%d:\t\t%10lu %3
lu %3lu | %10lu %3lu %3l
u\n",
+ seq_printf(seq, "%d:\t\t%10lu %3
u %3u | %10lu %3u %3
u\n",
1 << i, r, pct(r, read_tot),
pct(read_cum, read_tot), w,
pct(w, write_tot),
@@
-844,7
+842,7
@@
static int osc_rpc_stats_seq_show(struct seq_file *seq, void *v)
unsigned long w = cli->cl_write_rpc_hist.oh_buckets[i];
read_cum += r;
write_cum += w;
- seq_printf(seq, "%d:\t\t%10lu %3
lu %3lu | %10lu %3lu %3l
u\n",
+ seq_printf(seq, "%d:\t\t%10lu %3
u %3u | %10lu %3u %3
u\n",
i, r, pct(r, read_tot),
pct(read_cum, read_tot), w,
pct(w, write_tot),
@@
-867,10
+865,10
@@
static int osc_rpc_stats_seq_show(struct seq_file *seq, void *v)
unsigned long w = cli->cl_write_offset_hist.oh_buckets[i];
read_cum += r;
write_cum += w;
-
seq_printf(seq, "%d:\t\t%10lu %3lu %3lu | %10lu %3lu %3l
u\n",
-
(i == 0) ? 0 : 1 << (i - 1),
-
r, pct(r, read_tot), pct(read_cum, read_tot),
-
w, pct(w, write_tot), pct(write_cum, write_tot));
+
seq_printf(seq, "%d:\t\t%10lu %3u %3u | %10lu %3u %3
u\n",
+ (i == 0) ? 0 : 1 << (i - 1),
+ r, pct(r, read_tot), pct(read_cum, read_tot),
+ w, pct(w, write_tot), pct(write_cum, write_tot));
if (read_cum == read_tot && write_cum == write_tot)
break;
}
@@
-879,7
+877,6
@@
static int osc_rpc_stats_seq_show(struct seq_file *seq, void *v)
return 0;
}
-#undef pct
static ssize_t osc_rpc_stats_seq_write(struct file *file,
const char __user *buf,