From owner-p4-projects@FreeBSD.ORG Fri Jun 26 21:14:06 2009 Return-Path: Delivered-To: p4-projects@freebsd.org Received: by hub.freebsd.org (Postfix, from userid 32767) id 548DF1065674; Fri, 26 Jun 2009 21:14:06 +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 1588A106564A for ; Fri, 26 Jun 2009 21:14:06 +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 036E38FC08 for ; Fri, 26 Jun 2009 21:14:06 +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 n5QLE5il083176 for ; Fri, 26 Jun 2009 21:14:05 GMT (envelope-from truncs@FreeBSD.org) Received: (from perforce@localhost) by repoman.freebsd.org (8.14.3/8.14.3/Submit) id n5QLE5EO083174 for perforce@freebsd.org; Fri, 26 Jun 2009 21:14:05 GMT (envelope-from truncs@FreeBSD.org) Date: Fri, 26 Jun 2009 21:14:05 GMT Message-Id: <200906262114.n5QLE5EO083174@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 165291 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: Fri, 26 Jun 2009 21:14:07 -0000 http://perforce.freebsd.org/chv.cgi?CH=165291 Change 165291 by truncs@aditya on 2009/06/26 21:13:33 It should return a cylinder group that is u_long and not ino_t. Affected files ... .. //depot/projects/soc2009/soc_ext2fs/src/sys/gnu/fs/ext2fs/ext2_alloc.c#16 edit Differences ... ==== //depot/projects/soc2009/soc_ext2fs/src/sys/gnu/fs/ext2fs/ext2_alloc.c#16 (text+ko) ==== @@ -51,7 +51,7 @@ #include static daddr_t ext2_alloccg(struct inode *, int, daddr_t, int); -static ino_t ext2_dirpref(struct m_ext2fs *); +static u_long ext2_dirpref(struct m_ext2fs *); static void ext2_fserr(struct m_ext2fs *, u_int, char *); static ino_t ext2_hashalloc(struct inode *, int, long, int, daddr_t (*)(struct inode *, int, daddr_t, @@ -547,11 +547,11 @@ * among those cylinder groups with above the average number of * free inodes, the one with the smallest number of directories. */ -static ino_t +static u_long ext2_dirpref(struct m_ext2fs *fs) { - int maxspace, avgifree; - ino_t cg, mincg; + int cg, maxspace, mincg, avgifree; + avgifree = fs->e2fs.e2fs_ficount / fs->e2fs_ncg; maxspace = 0; mincg = -1;