NetBSD/sys/ufs/ffs
bad a9d55720cc Pull in fix from FreeBSD ffs_alloc.c r121785:
Consider only cylinder groups with at least 75% of the average free space
per cylinder group and 75% of the average free inodes per cylinder group
as candidates for the creation of a new directory.  Avoids excessive I/O
scanning for a suitable cylinder group on relatively full file systems.

Tested by sborril and me.

Pullup: netbsd-6, netbsd-5


Original commit message:

Tweak the calculation of minbfree in ffs_dirpref() so that only
those cylinder groups that have at least 75% of the average free
space per cylinder group for that file system are considered as
candidates for the creation of a new directory.  The previous formula
for minbfree would set it to zero if the file system was more than
75% full, which allowed cylinder groups with no free space at all
to be chosen as candidates for directory creation, which resulted
in an expensive search for free blocks for each file that was
subsequently created in that directory.

Modify the calculation of minifree in the same way.

Decrease maxcontigdirs as the file system fills to decrease the
likelyhood that a cluster of directories will overflow the available
space in a cylinder group.

Reviewed by:	mckusick
Tested by:	kmarx@vicor.com
MFC after:	2 weeks
2013-10-28 21:32:52 +00:00
..
ffs_alloc.c Pull in fix from FreeBSD ffs_alloc.c r121785: 2013-10-28 21:32:52 +00:00
ffs_appleufs.c First step of random number subsystem rework described in 2011-11-19 22:51:18 +00:00
ffs_balloc.c Definining needswap where needed. 2013-10-20 00:29:10 +00:00
ffs_bswap.c Remove lfs-only inumber field (and its supporting union) from struct 2013-06-09 17:55:46 +00:00
ffs_extern.h Add an UFS_SNAPGONE() ufs op replacing the calls 2013-06-16 13:33:30 +00:00
ffs_inode.c Definining needswap where needed. 2013-10-20 00:29:10 +00:00
ffs_quota2.c Welcome to 5.99.53! Merge rmind-uvmplock branch: 2011-06-12 03:35:36 +00:00
ffs_snapshot.c Mark unused (in the !FFS_EI case) variables as such. 2013-10-19 19:28:13 +00:00
ffs_subr.c Definining needswap where needed. 2013-10-20 00:29:10 +00:00
ffs_tables.c
ffs_vfsops.c Replace macro v_specmountpoint with two functions spec_node_getmountedfs() 2013-09-30 18:57:59 +00:00
ffs_vnops.c Stick ffs_, ext2_, chfs_, filecore_, cd9660_, or mfs_ in front of 2013-06-23 07:28:36 +00:00
ffs_wapbl.c Turn a few __unused into __diagused 2013-10-25 11:35:55 +00:00
fs.h Add the FS_SUJ flag for journaled softupdates from FreeBSD. 2013-09-03 02:24:01 +00:00
Makefile