gfs2: Add new sysfs file for gfs2 status
authorBob Peterson <rpeterso@redhat.com>
Fri, 22 May 2020 18:54:41 +0000 (13:54 -0500)
committerAndreas Gruenbacher <agruenba@redhat.com>
Thu, 8 Apr 2021 13:07:21 +0000 (15:07 +0200)
commit9f9eb5a516e3750aec9342427457c6da849838cd
treee6890d213afd63f6586f06d3f8190296a77119e6
parentbea906ee1624aeb34ea2c5acca84728de4185726
gfs2: Add new sysfs file for gfs2 status

This patch adds a new file: /sys/fs/gfs2/*/status which will report
the status of the file system. Catting this file dumps the current
status of the file system according to various superblock variables.
For example:

Journal Checked:          1
Journal Live:             1
Journal ID:               0
Spectator:                0
Withdrawn:                0
No barriers:              0
No recovery:              0
Demote:                   0
No Journal ID:            1
Mounted RO:               0
RO Recovery:              0
Skip DLM Unlock:          0
Force AIL Flush:          0
FS Frozen:                0
Withdrawing:              0
Withdraw In Prog:         0
Remote Withdraw:          0
Withdraw Recovery:        0
sd_log_error:             0
sd_log_flush_lock:        0
sd_log_num_revoke:        0
sd_log_in_flight:         0
sd_log_blks_needed:       0
sd_log_blks_free:         32768
sd_log_flush_head:        0
sd_log_flush_tail:        5384
sd_log_blks_reserved:     0
sd_log_revokes_available: 503

Signed-off-by: Bob Peterson <rpeterso@redhat.com>
Signed-off-by: Andreas Gruenbacher <agruenba@redhat.com>
fs/gfs2/sys.c