PERFORCE change 165545 for review
Aditya Sarawgi
truncs at FreeBSD.org
Thu Jul 2 16:17:22 UTC 2009
http://perforce.freebsd.org/chv.cgi?CH=165545
Change 165545 by truncs at aditya on 2009/07/02 16:17:10
ext2_hashalloc is also used to find both a free inode and a free block.
Affected files ...
.. //depot/projects/soc2009/soc_ext2fs/src/sys/gnu/fs/ext2fs/ext2_alloc.c#23 edit
Differences ...
==== //depot/projects/soc2009/soc_ext2fs/src/sys/gnu/fs/ext2fs/ext2_alloc.c#23 (text+ko) ====
@@ -57,7 +57,7 @@
static u_long ext2_dirpref(struct m_ext2fs *);
static void ext2_fserr(struct m_ext2fs *, u_int, char *);
static struct ext2_gd * get_group_desc2(struct m_ext2fs *, int, struct buf **);
-static ino_t ext2_hashalloc(struct inode *, int, long, int,
+static u_long ext2_hashalloc(struct inode *, int, long, int,
daddr_t (*)(struct inode *, int, daddr_t,
int));
static daddr_t ext2_nodealloccg(struct inode *, int, daddr_t, int);
@@ -395,7 +395,7 @@
cg = ino_to_cg(fs, pip->i_number);
ipref = cg * fs->e2fs->e2fs_ipg + 1;
uprintf("b\n");
- ino = ext2_hashalloc(pip, cg, (long)ipref, mode, ext2_nodealloccg);
+ ino = (ino_t)ext2_hashalloc(pip, cg, (long)ipref, mode, ext2_nodealloccg);
uprintf("c\n");
if (ino == 0)
@@ -621,7 +621,7 @@
* 2) quadradically rehash on the cylinder group number.
* 3) brute force search for a free block.
*/
-static ino_t
+static u_long
ext2_hashalloc(struct inode *ip, int cg, long pref, int size,
daddr_t (*allocator)(struct inode *, int, daddr_t, int))
{
More information about the p4-projects
mailing list