[Ocfs2-tools-commits] smushran commits r1190 - trunk/debugfs.ocfs2

svn-commits@oss.oracle.com svn-commits at oss.oracle.com
Mon May 1 20:34:47 CDT 2006


Author: smushran
Signed-off-by: mfasheh
Date: 2006-05-01 20:34:46 -0500 (Mon, 01 May 2006)
New Revision: 1190

Modified:
   trunk/debugfs.ocfs2/commands.c
   trunk/debugfs.ocfs2/dump.c
Log:
hb command only shows values for used hb blocks
Signed-off-by: mfasheh

Modified: trunk/debugfs.ocfs2/commands.c
===================================================================
--- trunk/debugfs.ocfs2/commands.c	2006-05-02 01:33:49 UTC (rev 1189)
+++ trunk/debugfs.ocfs2/commands.c	2006-05-02 01:34:46 UTC (rev 1190)
@@ -610,6 +610,7 @@
 	printf ("findpath <block#>\t\t\tList one pathname of the inode/lockname\n");
 	printf ("fs_locks [-l]\t\t\t\tShow live fs locking state\n");
 	printf ("group <block#>\t\t\t\tShow chain group\n");
+	printf ("hb\t\t\t\t\tShows the used heartbeat blocks\n");
 	printf ("help, ?\t\t\t\t\tThis information\n");
 	printf ("lcd <directory>\t\t\t\tChange directory on a mounted flesystem\n");
 	printf ("locate <block#> ...\t\t\tList all pathnames of the inode(s)/lockname(s)\n");

Modified: trunk/debugfs.ocfs2/dump.c
===================================================================
--- trunk/debugfs.ocfs2/dump.c	2006-05-02 01:33:49 UTC (rev 1189)
+++ trunk/debugfs.ocfs2/dump.c	2006-05-02 01:34:46 UTC (rev 1190)
@@ -585,10 +585,11 @@
 	for (i = 0; i < 255 && ((i + 1) * 512 < len); ++i) {
 		hb = (struct o2hb_disk_heartbeat_block *)(buf + (i * 512));
 		ocfs2_swap_disk_heartbeat_block(hb);
-		fprintf (out, "\t%4u: %4u %016"PRIx64" %016"PRIx64" "
-			 "%08"PRIx32"\n", i,
-			 hb->hb_node, hb->hb_seq, hb->hb_generation,
-			 hb->hb_cksum);
+		if (hb->hb_seq)
+			fprintf (out, "\t%4u: %4u %016"PRIx64" %016"PRIx64" "
+				 "%08"PRIx32"\n", i,
+				 hb->hb_node, hb->hb_seq, hb->hb_generation,
+				 hb->hb_cksum);
 	}
 
 	return ;




More information about the Ocfs2-tools-commits mailing list