PERFORCE change 165839 for review

Aditya Sarawgi truncs at FreeBSD.org
Wed Jul 8 23:42:56 UTC 2009


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

Change 165839 by truncs at aditya on 2009/07/08 23:41:57

	Check whether the block group has a superblock if the sparse super feature is there.

Affected files ...

.. //depot/projects/soc2009/soc_ext2fs/src/sys/gnu/fs/ext2fs/ext2_alloc.c#29 edit
.. //depot/projects/soc2009/soc_ext2fs/src/sys/gnu/fs/ext2fs/ext2_extern.h#6 edit

Differences ...

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

@@ -891,5 +891,18 @@
                 *bh = fs->e2fs_group_desc[group_desc];
         return gdp + desc;
 }
+int
+cg_has_sb(int i)
+{
+        int a3, a5, a7;
 
+        if (i == 0 || i == 1)
+                return 1;
+        for (a3 = 3, a5 = 5, a7 = 7;
+            a3 <= i || a5 <= i || a7 <= i;
+            a3 *= 3, a5 *= 5, a7 *= 7)
+                if (i == a3 || i == a5 || i == a7)
+                        return 1;
+        return 0;
+}
 

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

@@ -80,8 +80,7 @@
 int	ext2_checkpath(struct inode *, struct inode *, struct ucred *);
 struct  ext2_gd * get_group_desc(struct mount * , 
 		unsigned int , struct buf ** );
-int	ext2_group_sparse(int group);
-void	ext2_discard_prealloc(struct inode *);
+int	cg_has_sb(int i);
 int	ext2_inactive(struct vop_inactive_args *);
 int	ext2_new_block(struct mount * mp, unsigned long goal,
 	    u_int32_t *prealloc_count, u_int32_t *prealloc_block);


More information about the p4-projects mailing list