From mboxrd@z Thu Jan 1 00:00:00 1970 From: Andrew Price Date: Fri, 07 Mar 2014 13:29:37 +0000 Subject: [Cluster-devel] [gfs2_edit PATCH] gfs2_edit: mark log headers with the unmounted flag In-Reply-To: <376888520.8664748.1393881422350.JavaMail.zimbra@redhat.com> References: <376888520.8664748.1393881422350.JavaMail.zimbra@redhat.com> Message-ID: <5319C9C1.6010009@redhat.com> List-Id: To: cluster-devel.redhat.com MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit On 03/03/14 21:17, Bob Peterson wrote: > Hi, > > 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. > > Regards, > > Bob Peterson > Red Hat File Systems > > Signed-off-by: Bob Peterson This is now in gfs2-utils.git/master Cheers, Andy > --- > diff --git a/gfs2/edit/journal.c b/gfs2/edit/journal.c > index 118d068..4dab61c 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) { >