Skip site navigation (1)Skip section navigation (2)
Date:      Wed, 8 Jul 2009 23:42:55 GMT
From:      Aditya Sarawgi <truncs@FreeBSD.org>
To:        Perforce Change Reviews <perforce@FreeBSD.org>
Subject:   PERFORCE change 165839 for review
Message-ID:  <200907082342.n68NgtRD021401@repoman.freebsd.org>

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

Change 165839 by truncs@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);



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