Date: Sat, 19 Sep 2009 13:51:44 GMT From: Aditya Sarawgi <truncs@FreeBSD.org> To: Perforce Change Reviews <perforce@FreeBSD.org> Subject: PERFORCE change 168681 for review Message-ID: <200909191351.n8JDpiZx072876@repoman.freebsd.org>
next in thread | raw e-mail | index | archive | help
http://perforce.freebsd.org/chv.cgi?CH=168681 Change 168681 by truncs@aditya on 2009/09/19 13:50:47 Orlov block allocator requires total no. of directories in a given file system as in-core superblock doesn't provide this information directly, a new variable called e2fs_total_dir has been added to in-memory superblock which will add the no. of directories in the individual groups at the time of mounting. Affected files ... .. //depot/projects/soc2009/soc_ext2fs/src/sys/fs/ext2fs/ext2_vfsops.c#6 edit Differences ... ==== //depot/projects/soc2009/soc_ext2fs/src/sys/fs/ext2fs/ext2_vfsops.c#6 (text+ko) ==== @@ -381,6 +381,11 @@ brelse(bp); bp = NULL; } + fs->e2fs_total_dir = 0; + for (i=0; i < fs->e2fs_gcount; i++){ + fs->e2fs_total_dir += fs->e2fs_gd[i].ext2bgd_ndirs; + } + uprintf("Total dirs %d", fs->e2fs_total_dir); if (es->e2fs_rev == E2FS_REV0 || (es->e2fs_features_rocompat & EXT2F_ROCOMPAT_LARGEFILE) == 0) fs->e2fs_maxfilesize = 0x7fffffff;
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200909191351.n8JDpiZx072876>