Skip to contentSkip to conversation

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

PATCH New Bob Peterson 1 participant 1 message Jun 11, 2014 1 message not in the archive

lore
Share & tools
lore

A message that is not in the archive (sent off-list or not yet received): [email protected]

#1 lore raw

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

Hi,

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.

Regards,

Bob Peterson
Red Hat File Systems

---

gfs2/edit/journal.c +6 -3
index e012bc3..bb56649 100644
@@ -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,