gfs2-utils: RHEL7 - gfs2_edit: mark log headers with the unmounted flag

Andrew Price andyp at fedoraproject.org
Mon Sep 8 17:33:07 UTC 2014


Gitweb:        http://git.fedorahosted.org/git/?p=gfs2-utils.git;a=commitdiff;h=9aade0ffe128aa2f252d722da78482105135014b
Commit:        9aade0ffe128aa2f252d722da78482105135014b
Parent:        b035ad976cab9fa09b0892d34e620a280a4865bc
Author:        Bob Peterson <rpeterso at redhat.com>
AuthorDate:    Mon Mar 3 16:17:02 2014 -0500
Committer:     Andrew Price <anprice at redhat.com>
CommitterDate: Thu Jul 24 17:00:57 2014 +0100

gfs2_edit: mark log headers with the unmounted flag

This patch prints out "[UNMOUNTED]" next to log headers that have the
unmounted flag set. That makes it much easier to determine the active
part of a journal.

Signed-off-by: Bob Peterson <rpeterso at redhat.com>
---
 gfs2/edit/journal.c |    7 +++++--
 1 files changed, 5 insertions(+), 2 deletions(-)

diff --git a/gfs2/edit/journal.c b/gfs2/edit/journal.c
index dc8a3ed..e012bc3 100644
--- a/gfs2/edit/journal.c
+++ b/gfs2/edit/journal.c
@@ -573,10 +573,13 @@ void dump_journal(const char *journal, int tblk)
 				check_journal_wrap(lh.lh_sequence,
 						   &highest_seq);
 				print_gfs2("0x%llx (j+%4llx): Log header: Seq"
-					   ": 0x%x, tail: 0x%x, blk: 0x%x",
+					   ": 0x%x, tail: 0x%x, blk: 0x%x%s",
 					   abs_block, ((jb + wrappt) % j_size)
 					   / sbd.bsize, lh.lh_sequence,
-					   lh.lh_tail, lh.lh_blkno);
+					   lh.lh_tail, lh.lh_blkno,
+					   lh.lh_flags ==
+					   GFS2_LOG_HEAD_UNMOUNT ?
+					   " [UNMOUNTED]" : "");
 			}
 			eol(0);
 		} else if (sbd.gfs1 && ld_blocks > 0) {


More information about the cluster-commits mailing list