PERFORCE change 164894 for review

Aditya Sarawgi truncs at FreeBSD.org
Mon Jun 22 20:09:22 UTC 2009


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

Change 164894 by truncs at aditya on 2009/06/22 20:09:04

	New functions. ext2_hashalloc will be used for inode allocation policy, ext2_dirpref will be used for allocating if its a 
	directory and ext2_alloccg will be used for allocating a block if it's available.

Affected files ...

.. //depot/projects/soc2009/soc_ext2fs/src/sys/gnu/fs/ext2fs/ext2_alloc.c#7 edit

Differences ...

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

@@ -51,7 +51,11 @@
 #include <gnu/fs/ext2fs/ext2_extern.h>
 
 static void	ext2_fserr(struct m_ext2fs *, u_int, char *);
-
+static daddr_t	ext2_alloccg(struct inode *, int, daddr_t, int);
+static ino_t	ext2_dirpref(struct m_ext2fs *);
+static ino_t	ext2_hashalloc(struct inode *, int, long, int,
+				daddr_t (*)(struct inode *, int, daddr_t, 
+						int));
 /*
  * Linux calls this functions at the following locations:
  * (1) the inode is freed
@@ -370,11 +374,11 @@
 	fs = pip->i_e2fs;
 	if (fs->e2fs->e2fs_ficount == 0)
 		goto noinodes;
-
+	
 	/* call the Linux routine - it returns the inode number only */
 	ino = ext2_new_inode(pip, mode);
 
-	if (ino == 0)
+	if (ino == 0) 
 		goto noinodes;
 	error = VFS_VGET(pvp->v_mount, ino, LK_EXCLUSIVE, vpp);
 	if (error) {


More information about the p4-projects mailing list