From: Yang Sheng Date: Wed, 11 Nov 2020 20:02:55 +0000 (+0800) Subject: LU-14130 osc: skip 0 row for rpc_stats X-Git-Tag: 2.13.57~24 X-Git-Url: https://git.whamcloud.com/?p=fs%2Flustre-release.git;a=commitdiff_plain;h=596f74c122f5edb0d45c4edf1b2aea4f741f7027;hp=543c5a6d66685ed99332a46e333dfe4a31b74028 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 --- 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;