From owner-p4-projects@FreeBSD.ORG Mon Jun 22 20:09:22 2009 Return-Path: Delivered-To: p4-projects@freebsd.org Received: by hub.freebsd.org (Postfix, from userid 32767) id 396D71065679; Mon, 22 Jun 2009 20:09:22 +0000 (UTC) Delivered-To: perforce@FreeBSD.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id ED744106564A for ; Mon, 22 Jun 2009 20:09:21 +0000 (UTC) (envelope-from truncs@FreeBSD.org) Received: from repoman.freebsd.org (repoman.freebsd.org [IPv6:2001:4f8:fff6::29]) by mx1.freebsd.org (Postfix) with ESMTP id DBB4B8FC26 for ; Mon, 22 Jun 2009 20:09:21 +0000 (UTC) (envelope-from truncs@FreeBSD.org) Received: from repoman.freebsd.org (localhost [127.0.0.1]) by repoman.freebsd.org (8.14.3/8.14.3) with ESMTP id n5MK9L5r057706 for ; Mon, 22 Jun 2009 20:09:21 GMT (envelope-from truncs@FreeBSD.org) Received: (from perforce@localhost) by repoman.freebsd.org (8.14.3/8.14.3/Submit) id n5MK9LJp057704 for perforce@freebsd.org; Mon, 22 Jun 2009 20:09:21 GMT (envelope-from truncs@FreeBSD.org) Date: Mon, 22 Jun 2009 20:09:21 GMT Message-Id: <200906222009.n5MK9LJp057704@repoman.freebsd.org> X-Authentication-Warning: repoman.freebsd.org: perforce set sender to truncs@FreeBSD.org using -f From: Aditya Sarawgi To: Perforce Change Reviews Cc: Subject: PERFORCE change 164894 for review X-BeenThere: p4-projects@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: p4 projects tree changes List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 22 Jun 2009 20:09:22 -0000 http://perforce.freebsd.org/chv.cgi?CH=164894 Change 164894 by truncs@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 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) {