kernel_optimize_test/fs/ext4
Theodore Ts'o 50797481a7 ext4: Avoid group preallocation for closed files
Currently the group preallocation code tries to find a large (512)
free block from which to do per-cpu group allocation for small files.
The problem with this scheme is that it leaves the filesystem horribly
fragmented.  In the worst case, if the filesystem is unmounted and
remounted (after a system shutdown, for example) we forget the fact
that wee were using a particular (now-partially filled) 512 block
extent.  So the next time we try to allocate space for a small file,
we will find *another* completely free 512 block chunk to allocate
small files.  Given that there are 32,768 blocks in a block group,
after 64 iterations of "mount, write one 4k file in a directory,
unmount", the block group will have 64 files, each separated by 511
blocks, and the block group will no longer have any free 512
completely free chunks of blocks for group preallocation space.

So if we try to allocate blocks for a file that has been closed, such
that we know the final size of the file, and the filesystem is not
busy, avoid using group preallocation.

Signed-off-by: "Theodore Ts'o" <tytso@mit.edu>
2009-09-18 13:34:02 -04:00
..
acl.c
acl.h
balloc.c
bitmap.c
block_validity.c
dir.c
ext4_extents.h
ext4_jbd2.c
ext4_jbd2.h
ext4.h ext4: Avoid group preallocation for closed files 2009-09-18 13:34:02 -04:00
extents.c
file.c
fsync.c
hash.c
ialloc.c ext4: fix build warning when EXT4FS_DEBUG is on 2009-07-27 21:44:40 -04:00
inode.c ext4: remove redundant test on unsigned 2009-08-10 22:47:22 -04:00
ioctl.c
Kconfig ext4: Add configurable run-time mballoc debugging 2009-09-18 13:38:55 -04:00
Makefile
mballoc.c ext4: Avoid group preallocation for closed files 2009-09-18 13:34:02 -04:00
mballoc.h ext4: Add configurable run-time mballoc debugging 2009-09-18 13:38:55 -04:00
migrate.c
move_extent.c ext4: fix journal ref count in move_extent_par_page 2009-08-10 23:05:28 -04:00
namei.c ext4: More buffer head reference leaks 2009-07-17 10:54:08 -04:00
resize.c
super.c ext4: Avoid null pointer dereference when decoding EROFS w/o a journal 2009-07-27 23:09:47 -04:00
symlink.c
xattr_security.c
xattr_trusted.c
xattr_user.c
xattr.c
xattr.h