Whamcloud - gitweb
LU-14130 osc: skip 0 row for rpc_stats 13/40613/2
authorYang Sheng <ys@whamcloud.com>
Wed, 11 Nov 2020 20:02:55 +0000 (04:02 +0800)
committerOleg Drokin <green@whamcloud.com>
Thu, 3 Dec 2020 07:27:31 +0000 (07:27 +0000)
Fix the rpc_stats statistic it should not print
0 row as it makes nosense.

Signed-off-by: Yang Sheng <ys@whamcloud.com>
Change-Id: Id3534bb43b5453daeed4db078c18912c4cc2f51e
Reviewed-on: https://review.whamcloud.com/40613
Tested-by: jenkins <devops@whamcloud.com>
Reviewed-by: Andreas Dilger <adilger@whamcloud.com>
Tested-by: Maloo <maloo@whamcloud.com>
Reviewed-by: Jian Yu <yujian@whamcloud.com>
lustre/mdc/lproc_mdc.c
lustre/osc/lproc_osc.c

index a2ca754..b52f241 100644 (file)
@@ -378,7 +378,7 @@ static int mdc_rpc_stats_seq_show(struct seq_file *seq, void *v)
 
        read_cum = 0;
        write_cum = 0;
 
        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];
 
                unsigned long r = cli->cl_read_rpc_hist.oh_buckets[i];
                unsigned long w = cli->cl_write_rpc_hist.oh_buckets[i];
 
index a497228..85180ac 100644 (file)
@@ -818,7 +818,7 @@ static int osc_rpc_stats_seq_show(struct seq_file *seq, void *v)
 
         read_cum = 0;
         write_cum = 0;
 
         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;
                 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;