diff mbox series

[14/39] lustre: osc: skip 0 row for rpc_stats

Message ID 1611249422-556-15-git-send-email-jsimmons@infradead.org (mailing list archive)
State New
Headers show
Series lustre: update to latest OpenSFS version as of Jan 21 2021 | expand

Commit Message

James Simmons Jan. 21, 2021, 5:16 p.m. UTC
From: Yang Sheng <ys@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@whamcloud.com>
Reviewed-on: https://review.whamcloud.com/40613
Reviewed-by: Andreas Dilger <adilger@whamcloud.com>
Reviewed-by: Jian Yu <yujian@whamcloud.com>
Signed-off-by: James Simmons <jsimmons@infradead.org>
---
 fs/lustre/mdc/lproc_mdc.c | 2 +-
 fs/lustre/osc/lproc_osc.c | 2 +-
 2 files changed, 2 insertions(+), 2 deletions(-)
diff mbox series

Patch

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];