From 596f74c122f5edb0d45c4edf1b2aea4f741f7027 Mon Sep 17 00:00:00 2001 From: Yang Sheng Date: Thu, 12 Nov 2020 04:02:55 +0800 Subject: [PATCH 1/1] LU-14130 osc: skip 0 row for rpc_stats Fix the rpc_stats statistic it should not print 0 row as it makes nosense. Signed-off-by: Yang Sheng Change-Id: Id3534bb43b5453daeed4db078c18912c4cc2f51e Reviewed-on: https://review.whamcloud.com/40613 Tested-by: jenkins Reviewed-by: Andreas Dilger Tested-by: Maloo Reviewed-by: Jian Yu --- lustre/mdc/lproc_mdc.c | 2 +- lustre/osc/lproc_osc.c | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/lustre/mdc/lproc_mdc.c b/lustre/mdc/lproc_mdc.c index a2ca754..b52f241 100644 --- a/lustre/mdc/lproc_mdc.c +++ b/lustre/mdc/lproc_mdc.c @@ -378,7 +378,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/lustre/osc/lproc_osc.c b/lustre/osc/lproc_osc.c index a497228..85180ac 100644 --- a/lustre/osc/lproc_osc.c +++ b/lustre/osc/lproc_osc.c @@ -818,7 +818,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]; read_cum += r; -- 1.8.3.1