[Ocfs2-tools-commits] smushran commits r1199 - trunk/debugfs.ocfs2
svn-commits@oss.oracle.com
svn-commits at oss.oracle.com
Tue May 23 12:01:30 CDT 2006
Author: smushran
Signed-off-by: mfasheh
Date: 2006-05-23 12:01:30 -0500 (Tue, 23 May 2006)
New Revision: 1199
Modified:
trunk/debugfs.ocfs2/dump.c
trunk/debugfs.ocfs2/journal.c
Log:
logdump now detects group descriptor blocks
Signed-off-by: mfasheh
Modified: trunk/debugfs.ocfs2/dump.c
===================================================================
--- trunk/debugfs.ocfs2/dump.c 2006-05-16 20:09:50 UTC (rev 1198)
+++ trunk/debugfs.ocfs2/dump.c 2006-05-23 17:01:30 UTC (rev 1199)
@@ -527,6 +527,11 @@
dump_extent_block (out, (struct ocfs2_extent_block *)buf);
fprintf (out, "\n");
break;
+ case 3:
+ fprintf(out, "Group\n");
+ dump_group_descriptor (out, (struct ocfs2_group_desc *)buf, 0);
+ fprintf (out, "\n");
+ break;
default:
fprintf (out, "TODO\n\n");
break;
Modified: trunk/debugfs.ocfs2/journal.c
===================================================================
--- trunk/debugfs.ocfs2/journal.c 2006-05-16 20:09:50 UTC (rev 1198)
+++ trunk/debugfs.ocfs2/journal.c 2006-05-23 17:01:30 UTC (rev 1199)
@@ -91,6 +91,7 @@
{
struct ocfs2_dinode *inode;
struct ocfs2_extent_block *extent;
+ struct ocfs2_group_desc *group;
int ret = -1;
inode = (struct ocfs2_dinode *)buf;
@@ -107,6 +108,13 @@
goto bail;
}
+ group = (struct ocfs2_group_desc *)buf;
+ if (!memcmp(group->bg_signature, OCFS2_GROUP_DESC_SIGNATURE,
+ sizeof(OCFS2_GROUP_DESC_SIGNATURE))) {
+ ret = 3;
+ goto bail;
+ }
+
bail:
return ret;
} /* detect_block */
More information about the Ocfs2-tools-commits
mailing list