[lustre-devel] [PATCH 14/39] lustre: osc: skip 0 row for rpc_stats
James Simmons
jsimmons at infradead.org
Thu Jan 21 09:16:37 PST 2021
From: Yang Sheng <ys at whamcloud.com>
Fix the rpc_stats statistic it should not print
0 row as it makes nosense.
WC-bug-id: https://jira.whamcloud.com/browse/LU-14130
Lustre-commit: 596f74c122f5ed ("LU-14130 osc: skip 0 row for rpc_stats")
Signed-off-by: Yang Sheng <ys at whamcloud.com>
Reviewed-on: https://review.whamcloud.com/40613
Reviewed-by: Andreas Dilger <adilger at whamcloud.com>
Reviewed-by: Jian Yu <yujian at whamcloud.com>
Signed-off-by: James Simmons <jsimmons at infradead.org>
---
fs/lustre/mdc/lproc_mdc.c | 2 +-
fs/lustre/osc/lproc_osc.c | 2 +-
2 files changed, 2 insertions(+), 2 deletions(-)
diff --git a/fs/lustre/mdc/lproc_mdc.c b/fs/lustre/mdc/lproc_mdc.c
index 662be42..ce03999 100644
--- a/fs/lustre/mdc/lproc_mdc.c
+++ b/fs/lustre/mdc/lproc_mdc.c
@@ -383,7 +383,7 @@ static int mdc_rpc_stats_seq_show(struct seq_file *seq, void *v)
read_cum = 0;
write_cum = 0;
- for (i = 0; i < OBD_HIST_MAX; i++) {
+ for (i = 1; i < OBD_HIST_MAX; i++) {
unsigned long r = cli->cl_read_rpc_hist.oh_buckets[i];
unsigned long w = cli->cl_write_rpc_hist.oh_buckets[i];
diff --git a/fs/lustre/osc/lproc_osc.c b/fs/lustre/osc/lproc_osc.c
index 7ea9530..89b55c3 100644
--- a/fs/lustre/osc/lproc_osc.c
+++ b/fs/lustre/osc/lproc_osc.c
@@ -808,7 +808,7 @@ static int osc_rpc_stats_seq_show(struct seq_file *seq, void *v)
read_cum = 0;
write_cum = 0;
- for (i = 0; i < OBD_HIST_MAX; i++) {
+ for (i = 1; i < OBD_HIST_MAX; i++) {
unsigned long r = cli->cl_read_rpc_hist.oh_buckets[i];
unsigned long w = cli->cl_write_rpc_hist.oh_buckets[i];
--
1.8.3.1
More information about the lustre-devel
mailing list