gfs2-utils: master - gfs2_edit: print LB (log descriptor continuation blocks) for GFS2

Bob Peterson rpeterso at fedoraproject.org
Fri Jun 13 17:42:40 UTC 2014


Gitweb:        http://git.fedorahosted.org/git/?p=gfs2-utils.git;a=commitdiff;h=19601f7889e2ff68f9c91af63322e519ff456e6e
Commit:        19601f7889e2ff68f9c91af63322e519ff456e6e
Parent:        f4fc86b28a551252bd3b8fc1f7e19bf161c600b2
Author:        Bob Peterson <rpeterso at redhat.com>
AuthorDate:    Tue Jun 10 11:32:29 2014 -0500
Committer:     Bob Peterson <rpeterso at redhat.com>
CommitterDate: Wed Jun 11 12:17:51 2014 -0500

gfs2_edit: print LB (log descriptor continuation blocks) for GFS2

This patch allows gfs2_edit to print metadata blocks of type LB
(log descriptor continuation blocks) for GFS2. Prior to this, only
GFS1's continuation blocks would print.
---
 gfs2/edit/journal.c |    9 ++++++---
 1 files changed, 6 insertions(+), 3 deletions(-)

diff --git a/gfs2/edit/journal.c b/gfs2/edit/journal.c
index e012bc3..bb56649 100644
--- a/gfs2/edit/journal.c
+++ b/gfs2/edit/journal.c
@@ -582,12 +582,15 @@ void dump_journal(const char *journal, int tblk)
 					   " [UNMOUNTED]" : "");
 			}
 			eol(0);
-		} else if (sbd.gfs1 && ld_blocks > 0) {
-			print_gfs2("0x%llx (j+%4llx): GFS log descriptor"
+		} else if ((ld_blocks > 0) &&
+			   (sbd.gfs1 || block_type == GFS2_METATYPE_LB)) {
+			print_gfs2("0x%llx (j+%4llx): Log descriptor"
 				   " continuation block", abs_block, jb);
 			eol(0);
 			print_gfs2("                    ");
-			ld_blocks -= print_ld_blks((uint64_t *)dummy_bh.b_data,
+			ld_blocks -= print_ld_blks((uint64_t *)dummy_bh.b_data +
+						   (sbd.gfs1 ? 0 :
+						    sizeof(struct gfs2_meta_header)),
 						   (dummy_bh.b_data +
 						    sbd.bsize), start_line,
 						   tblk, &tblk_off, 0, rgd,


More information about the cluster-commits mailing list