[Cluster-devel] [PATCH] gfs2: Incomplete "sbstat" statistics?
Andreas Gruenbacher
andreas.gruenbacher at gmail.com
Wed Aug 26 14:10:30 UTC 2015
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 <agruenba at redhat.com>
---
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
More information about the Cluster-devel
mailing list