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

Andrew Price andyp at fedoraproject.org
Fri Mar 7 13:27:35 UTC 2014


Gitweb:        http://git.fedorahosted.org/git/?p=gfs2-utils.git;a=commitdiff;h=dce63a150565f91d1386e2444d6cb378e8be1dd5
Commit:        dce63a150565f91d1386e2444d6cb378e8be1dd5
Parent:        caa139f3ea058581bb50ef919e6c412c3da4dfc2
Author:        Bob Peterson <rpeterso at redhat.com>
AuthorDate:    Mon Mar 3 16:17:02 2014 -0500
Committer:     Andrew Price <anprice at redhat.com>
CommitterDate: Fri Mar 7 13:23:32 2014 +0000

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