Skip site navigation (1)Skip section navigation (2)
Date:      Fri, 12 Jun 2009 14:00:34 GMT
From:      Aditya Sarawgi <truncs@FreeBSD.org>
To:        Perforce Change Reviews <perforce@FreeBSD.org>
Subject:   PERFORCE change 164171 for review
Message-ID:  <200906121400.n5CE0Yk5076146@repoman.freebsd.org>

next in thread | raw e-mail | index | archive | help
http://perforce.freebsd.org/chv.cgi?CH=164171

Change 164171 by truncs@aditya on 2009/06/12 14:00:09

	Renaming to new macro-instructions and cleanup

Affected files ...

.. //depot/projects/soc2009/soc_ext2fs/src/sys/gnu/fs/ext2fs/ext2_fs.h#14 edit
.. //depot/projects/soc2009/soc_ext2fs/src/sys/gnu/fs/ext2fs/ext2_linux_balloc.c#6 edit
.. //depot/projects/soc2009/soc_ext2fs/src/sys/gnu/fs/ext2fs/ext2_lookup.c#5 edit
.. //depot/projects/soc2009/soc_ext2fs/src/sys/gnu/fs/ext2fs/ext2_vfsops.c#9 edit
.. //depot/projects/soc2009/soc_ext2fs/src/sys/gnu/fs/ext2fs/ext2_vnops.c#8 edit

Differences ...

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

@@ -101,7 +101,7 @@
 #define EXT2_UNDEL_DIR_INO	 6	/* Undelete directory inode */
 
 /* First non-reserved inode for old ext2 filesystems */
-#define EXT2_GOOD_OLD_FIRST_INO	11
+#define E2FS_REV0_FIRST_INO	11
 
 /*
  * The second extended file system magic number

==== //depot/projects/soc2009/soc_ext2fs/src/sys/gnu/fs/ext2fs/ext2_linux_balloc.c#6 (text+ko) ====

@@ -555,7 +555,7 @@
 		bh = sb->e2fs_bb[bitmap_nr];
 
 		if (!(es->e2fs_features_rocompat &
-		     EXT2_FEATURE_RO_COMPAT_SPARSE_SUPER) ||
+		     EXT2F_ROCOMPAT_SPARSESUPER) ||
 		    ext2_group_sparse(i)) {
 			if (!test_bit (0, bh->b_data))
 				printf ("ext2_check_blocks_bitmap: "

==== //depot/projects/soc2009/soc_ext2fs/src/sys/gnu/fs/ext2fs/ext2_lookup.c#5 (text+ko) ====

@@ -772,7 +772,7 @@
 	newdir.inode = ip->i_number;
 	newdir.name_len = cnp->cn_namelen;
 	if (EXT2_HAS_INCOMPAT_FEATURE(ip->i_e2fs,
-	    EXT2_FEATURE_INCOMPAT_FILETYPE))
+	    EXT2F_INCOMPAT_FTYPE))
 		newdir.file_type = DTTOFT(IFTODT(ip->i_mode));
 	else
 		newdir.file_type = EXT2_FT_UNKNOWN;
@@ -950,7 +950,7 @@
 		return (error);
 	ep->inode = ip->i_number;
 	if (EXT2_HAS_INCOMPAT_FEATURE(ip->i_e2fs,
-	    EXT2_FEATURE_INCOMPAT_FILETYPE))
+	    EXT2F_INCOMPAT_FTYPE))
 		ep->file_type = DTTOFT(IFTODT(ip->i_mode));
 	else
 		ep->file_type = EXT2_FT_UNKNOWN;

==== //depot/projects/soc2009/soc_ext2fs/src/sys/gnu/fs/ext2fs/ext2_vfsops.c#9 (text+ko) ====

@@ -172,7 +172,7 @@
 			error = ext2_flushfiles(mp, flags, td);
 			vfs_unbusy(mp);
 			if (!error && fs->e2fs_wasvalid) {
-				fs->e2fs->e2fs_state |= EXT2_VALID_FS;
+				fs->e2fs->e2fs_state |= E2FS_ISCLEAN;
 				ext2_sbupdate(ump, MNT_WAIT);
 			}
 			fs->e2fs_ronly = 1;
@@ -214,8 +214,8 @@
 			if (error)
 				return (error);
 
-			if ((fs->e2fs->e2fs_state & EXT2_VALID_FS) == 0 ||
-			    (fs->e2fs->e2fs_state & EXT2_ERROR_FS)) {
+			if ((fs->e2fs->e2fs_state & E2FS_ISCLEAN) == 0 ||
+			    (fs->e2fs->e2fs_state & E2FS_ERRORS)) {
 				if (mp->mnt_flag & MNT_FORCE) {
 					printf(
 "WARNING: %s was not properly dismounted\n", fs->e2fs_fsmnt);
@@ -226,7 +226,7 @@
 					return (EPERM);
 				}
 			}
-			fs->e2fs->e2fs_state &= ~EXT2_VALID_FS;
+			fs->e2fs->e2fs_state &= ~E2FS_ISCLEAN;
 			ext2_sbupdate(ump, MNT_WAIT);
 			fs->e2fs_ronly = 0;
 			MNT_ILOCK(mp);
@@ -351,20 +351,20 @@
 ext2_check_sb_compat(struct ext2fs *es, struct cdev *dev, int ronly)
 {
 
-	if (es->e2fs_magic != EXT2_SUPER_MAGIC) {
+	if (es->e2fs_magic != E2FS_MAGIC) {
 		printf("ext2fs: %s: wrong magic number %#x (expected %#x)\n",
-		    devtoname(dev), es->e2fs_magic, EXT2_SUPER_MAGIC);
+		    devtoname(dev), es->e2fs_magic, E2FS_MAGIC);
 		return (1);
 	}
-	if (es->e2fs_rev > EXT2_GOOD_OLD_REV) {
-		if (es->e2fs_features_incompat & ~EXT2_FEATURE_INCOMPAT_SUPP) {
+	if (es->e2fs_rev > E2FS_REV0) {
+		if (es->e2fs_features_incompat & ~EXT2F_INCOMPAT_SUPP) {
 			printf(
 "WARNING: mount of %s denied due to unsupported optional features\n",
 			    devtoname(dev));
 			return (1);
 		}
 		if (!ronly &&
-		    (es->e2fs_features_rocompat & ~EXT2_FEATURE_RO_COMPAT_SUPP)) {
+		    (es->e2fs_features_rocompat & ~EXT2F_ROCOMPAT_SUPP)) {
 			printf("WARNING: R/W mount of %s denied due to "
 			    "unsupported optional features\n", devtoname(dev));
 			return (1);
@@ -396,9 +396,9 @@
 	fs->e2fs_bpg = es->e2fs_bpg;
 	fs->e2fs_fpg = es->e2fs_fpg;
 	fs->e2fs_ipg = es->e2fs_ipg;
-	if (es->e2fs_rev == EXT2_GOOD_OLD_REV) {
-		fs->e2fs_first_inode = EXT2_GOOD_OLD_FIRST_INO;
-		fs->e2fs_isize = EXT2_GOOD_OLD_INODE_SIZE;
+	if (es->e2fs_rev == E2FS_REV0) {
+		fs->e2fs_first_inode = E2FS_REV0_FIRST_INO;
+		fs->e2fs_isize = E2FS_REV0_INODE_SIZE ;
 	} else {
 		fs->e2fs_first_inode = es->e2fs_first_ino;
 		fs->e2fs_isize = es->e2fs_inode_size;
@@ -406,7 +406,7 @@
 		/*
 		 * Simple sanity check for superblock inode size value.
 		 */
-		if (fs->e2fs_isize < EXT2_GOOD_OLD_INODE_SIZE ||
+		if (fs->e2fs_isize < E2FS_REV0_INODE_SIZE  ||
 		    fs->e2fs_isize > fs->e2fs_bsize ||
 		    (fs->e2fs_isize & (fs->e2fs_isize - 1)) != 0) {
 			printf("EXT2-fs: invalid inode size %d\n",
@@ -463,8 +463,8 @@
 	}
 	fs->e2fs_lib = 0;
 	fs->e2fs_lbb = 0;
-	if (es->e2fs_rev == EXT2_GOOD_OLD_REV ||
-	    (es->e2fs_features_rocompat & EXT2_FEATURE_RO_COMPAT_LARGE_FILE) == 0)
+	if (es->e2fs_rev == E2FS_REV0 ||
+	    (es->e2fs_features_rocompat & EXT2F_ROCOMPAT_LARGEFILE) == 0)
 		fs->e2fs_maxfilesize = 0x7fffffff;
 	else
 		fs->e2fs_maxfilesize = 0x7fffffffffffffff;
@@ -626,8 +626,8 @@
 		error = EINVAL;		/* XXX needs translation */
 		goto out;
 	}
-	if ((es->e2fs_state & EXT2_VALID_FS) == 0 ||
-	    (es->e2fs_state & EXT2_ERROR_FS)) {
+	if ((es->e2fs_state & E2FS_ISCLEAN) == 0 ||
+	    (es->e2fs_state & E2FS_ERRORS)) {
 		if (ronly || (mp->mnt_flag & MNT_FORCE)) {
 			printf(
 "WARNING: Filesystem was not properly dismounted\n");
@@ -667,10 +667,10 @@
 	 * If the fs is not mounted read-only, make sure the super block is
 	 * always written back on a sync().
 	 */
-	fs->e2fs_wasvalid = fs->e2fs->e2fs_state & EXT2_VALID_FS ? 1 : 0;
+	fs->e2fs_wasvalid = fs->e2fs->e2fs_state & E2FS_ISCLEAN ? 1 : 0;
 	if (ronly == 0) {
 		fs->e2fs_fmod = 1;		/* mark it modified */
-		fs->e2fs->e2fs_state &= ~EXT2_VALID_FS;	/* set fs invalid */
+		fs->e2fs->e2fs_state &= ~E2FS_ISCLEAN;	/* set fs invalid */
 	}
 	mp->mnt_data = ump;
 	mp->mnt_stat.f_fsid.val[0] = dev2udev(dev);
@@ -737,7 +737,7 @@
 	ronly = fs->e2fs_ronly;
 	if (ronly == 0) {
 		if (fs->e2fs_wasvalid)
-			fs->e2fs->e2fs_state |= EXT2_VALID_FS;
+			fs->e2fs->e2fs_state |= E2FS_ISCLEAN;
 		ext2_sbupdate(ump, MNT_WAIT);
 	}
 
@@ -799,13 +799,13 @@
 	fs = ump->um_e2fs;
 	es = fs->e2fs;
 
-	if (es->e2fs_magic != EXT2_SUPER_MAGIC)
+	if (es->e2fs_magic != E2FS_MAGIC)
 		panic("ext2_statfs - magic number spoiled");
 
 	/*
 	 * Compute the overhead (FS structures)
 	 */
-	if (es->e2fs_features_rocompat & EXT2_FEATURE_RO_COMPAT_SPARSE_SUPER) {
+	if (es->e2fs_features_rocompat & EXT2F_ROCOMPAT_SPARSESUPER) {
 		nsb = 0;
 		for (i = 0 ; i < fs->e2fs_gcount; i++)
 			if (ext2_group_sparse(i))

==== //depot/projects/soc2009/soc_ext2fs/src/sys/gnu/fs/ext2fs/ext2_vnops.c#8 (text+ko) ====

@@ -1191,7 +1191,7 @@
 
 	/* Initialize directory with "." and ".." from static template. */
 	if (EXT2_HAS_INCOMPAT_FEATURE(ip->i_e2fs,
-	    EXT2_FEATURE_INCOMPAT_FILETYPE))
+	    EXT2F_INCOMPAT_FTYPE))
 		dtp = &mastertemplate;
 	else
 		dtp = &omastertemplate;



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200906121400.n5CE0Yk5076146>