[Ocfs2-tools-commits] jlbec commits r401 - in trunk: dlmtools
libocfs2 libocfs2/include
svn-commits at oss.oracle.com
svn-commits at oss.oracle.com
Mon Nov 15 19:37:30 CST 2004
Author: jlbec
Date: 2004-11-15 19:37:28 -0600 (Mon, 15 Nov 2004)
New Revision: 401
Modified:
trunk/dlmtools/
trunk/libocfs2/include/ocfs2.h
trunk/libocfs2/openfs.c
Log:
o Add OCFS2_FLAG_NO_REV_CHECK to ignore validation of the OCFS
vol_header at block 0. This is for fsck usage.
Property changes on: trunk/dlmtools
___________________________________________________________________
Name: svn:ignore
- cscope*
listuuid
stamp-md5
+ cscope*
listuuid
stamp-md5
listuuid.ocfs2
.*.sw?
Modified: trunk/libocfs2/include/ocfs2.h
===================================================================
--- trunk/libocfs2/include/ocfs2.h 2004-11-15 23:33:04 UTC (rev 400)
+++ trunk/libocfs2/include/ocfs2.h 2004-11-16 01:37:28 UTC (rev 401)
@@ -67,6 +67,9 @@
#define OCFS2_FLAG_DIRTY 0x04
#define OCFS2_FLAG_SWAP_BYTES 0x08
#define OCFS2_FLAG_BUFFERED 0x10
+#define OCFS2_FLAG_NO_REV_CHECK 0x20 /* Do not check the OCFS
+ vol_header structure for
+ revision info */
/* Return flags for the extent iterator functions */
#define OCFS2_EXTENT_CHANGED 0x01
Modified: trunk/libocfs2/openfs.c
===================================================================
--- trunk/libocfs2/openfs.c 2004-11-15 23:33:04 UTC (rev 400)
+++ trunk/libocfs2/openfs.c 2004-11-16 01:37:28 UTC (rev 401)
@@ -158,9 +158,16 @@
goto out;
strcpy(fs->fs_devname, name);
- ret = ocfs2_validate_ocfs1_header(fs);
- if (ret)
- goto out;
+ /*
+ * If OCFS2_FLAG_NO_REV_CHECK is specified, fsck (or someone
+ * like it) is asking to ignore the OCFS vol_header at
+ * block 0.
+ */
+ if (!(flags & OCFS2_FLAG_NO_REV_CHECK)) {
+ ret = ocfs2_validate_ocfs1_header(fs);
+ if (ret)
+ goto out;
+ }
if (superblock) {
ret = OCFS2_ET_INVALID_ARGUMENT;
More information about the Ocfs2-tools-commits
mailing list