PERFORCE change 168681 for review
Aditya Sarawgi
truncs at FreeBSD.org
Sat Sep 19 13:51:45 UTC 2009
http://perforce.freebsd.org/chv.cgi?CH=168681
Change 168681 by truncs at 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;
More information about the p4-projects
mailing list