From: Andreas Gruenbacher Date: Wed, 26 Aug 2015 16:10:30 +0200 Subject: [Cluster-devel] [PATCH] gfs2: Incomplete "sbstat" statistics? Message-ID: <1440598230-15527-1-git-send-email-agruenba@redhat.com> List-Id: To: cluster-devel.redhat.com MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit In gfs2_sbstats_seq_show, we are using the first column for the cpu number. We are only iterating over "gltype" times "stype" values so we end up not reporting the last statistic, "journal queue". I assume this is a bug? Signed-off-by: Andreas Gruenbacher --- fs/gfs2/glock.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/fs/gfs2/glock.c b/fs/gfs2/glock.c index 1b6aebe..9b6e1a0 100644 --- a/fs/gfs2/glock.c +++ b/fs/gfs2/glock.c @@ -1933,7 +1933,7 @@ static void *gfs2_sbstats_seq_start(struct seq_file *seq, loff_t *pos) struct gfs2_glock_iter *gi = seq->private; gi->hash = *pos; - if (*pos >= GFS2_NR_SBSTATS) + if (*pos > GFS2_NR_SBSTATS) return NULL; preempt_disable(); return SEQ_START_TOKEN; @@ -1945,7 +1945,7 @@ static void *gfs2_sbstats_seq_next(struct seq_file *seq, void *iter_ptr, struct gfs2_glock_iter *gi = seq->private; (*pos)++; gi->hash++; - if (gi->hash >= GFS2_NR_SBSTATS) { + if (gi->hash > GFS2_NR_SBSTATS) { preempt_enable(); return NULL; } -- 2.4.3