PERFORCE change 164028 for review

Aditya Sarawgi truncs at FreeBSD.org
Wed Jun 10 18:31:03 UTC 2009


http://perforce.freebsd.org/chv.cgi?CH=164028

Change 164028 by truncs at aditya on 2009/06/10 18:30:02

	New macro-instruction and cleanup
	The Mount flags are never used in FreeBSD's implementation they are just to maintain the compatibility between linux sources
	the same applies to blocks defined by #ifdef notyet.

Affected files ...

.. //depot/projects/soc2009/soc_ext2fs/src/sys/gnu/fs/ext2fs/ext2_fs.h#12 edit

Differences ...

==== //depot/projects/soc2009/soc_ext2fs/src/sys/gnu/fs/ext2fs/ext2_fs.h#12 (text+ko) ====

@@ -106,7 +106,7 @@
 /*
  * The second extended file system magic number
  */
-#define EXT2_SUPER_MAGIC	0xEF53
+#define E2FS_MAGIC		0xEF53
 
 #ifdef __KERNEL__
 #include <linux/ext2_fs_sb.h>
@@ -350,43 +350,19 @@
 #endif
 
 /*
- * File system states
+ * File clean flags
  */
-#define	EXT2_VALID_FS			0x0001	/* Unmounted cleanly */
-#define	EXT2_ERROR_FS			0x0002	/* Errors detected */
+#define	E2FS_ISCLEAN			0x0001	/* Unmounted cleanly */
+#define	E2FS_ERRORS			0x0002	/* Errors detected */
 
 /*
- * Mount flags
+ * Definitions of behavior on errors
  */
-#define EXT2_MOUNT_CHECK_NORMAL		0x0001	/* Do some more checks */
-#define EXT2_MOUNT_CHECK_STRICT		0x0002	/* Do again more checks */
-#define EXT2_MOUNT_CHECK		(EXT2_MOUNT_CHECK_NORMAL | \
-					 EXT2_MOUNT_CHECK_STRICT)
-#define EXT2_MOUNT_GRPID		0x0004	/* Create files with directory's group */
-#define EXT2_MOUNT_DEBUG		0x0008	/* Some debugging messages */
-#define EXT2_MOUNT_ERRORS_CONT		0x0010	/* Continue on errors */
-#define EXT2_MOUNT_ERRORS_RO		0x0020	/* Remount fs ro on errors */
-#define EXT2_MOUNT_ERRORS_PANIC		0x0040	/* Panic on errors */
-#define EXT2_MOUNT_MINIX_DF		0x0080	/* Mimics the Minix statfs */
-
-#define clear_opt(o, opt)		o &= ~EXT2_MOUNT_##opt
-#define set_opt(o, opt)			o |= EXT2_MOUNT_##opt
-#define test_opt(sb, opt)		(EXT2_SB(sb)->e2fs_mount_opt & \
-					 EXT2_MOUNT_##opt)
-/*
- * Maximal mount counts between two filesystem checks
- */
-#define EXT2_DFL_MAX_MNT_COUNT		20	/* Allow 20 mounts */
-#define EXT2_DFL_CHECKINTERVAL		0	/* Don't use interval check */
+#define E2FS_BEH_CONTINUE		1	/* continue operation */
+#define E2FS_BEH_READONLY		2	/* remount fs read only */
+#define E2FS_BEH_PANIC			3	/* cause panic */
+#define E2FS_BEH_DEFAULT		E2FS_BEH_CONTINUE
 
-/*
- * Behaviour when detecting errors
- */
-#define EXT2_ERRORS_CONTINUE		1	/* Continue execution */
-#define EXT2_ERRORS_RO			2	/* Remount fs read-only */
-#define EXT2_ERRORS_PANIC		3	/* Panic */
-#define EXT2_ERRORS_DEFAULT		EXT2_ERRORS_CONTINUE
-
 
 /*
  * Super block for an ext2fs file system.
@@ -498,7 +474,7 @@
 
 
 /*
- * Codes for operating systems
+ * OS identification
  */
 #define E2FS_OS_LINUX		0
 #define E2FS_OS_HURD		1


More information about the p4-projects mailing list