original_kernel/fs/ext4
Theodore Ts'o 9d0be50230 ext4: Calculate metadata requirements more accurately
In the past, ext4_calc_metadata_amount(), and its sub-functions
ext4_ext_calc_metadata_amount() and ext4_indirect_calc_metadata_amount()
badly over-estimated the number of metadata blocks that might be
required for delayed allocation blocks.  This didn't matter as much
when functions which managed the reserved metadata blocks were more
aggressive about dropping reserved metadata blocks as delayed
allocation blocks were written, but unfortunately they were too
aggressive.  This was fixed in commit 0637c6f, but as a result the
over-estimation by ext4_calc_metadata_amount() would lead to reserving
2-3 times the number of pending delayed allocation blocks as
potentially required metadata blocks.  So if there are 1 megabytes of
blocks which have been not yet been allocation, up to 3 megabytes of
space would get reserved out of the user's quota and from the file
system free space pool until all of the inode's data blocks have been
allocated.

This commit addresses this problem by much more accurately estimating
the number of metadata blocks that will be required.  It will still
somewhat over-estimate the number of blocks needed, since it must make
a worst case estimate not knowing which physical blocks will be
needed, but it is much more accurate than before.

Signed-off-by: "Theodore Ts'o" <tytso@mit.edu>
2010-01-01 02:41:30 -05:00
..
Kconfig ext4: Don't ask about supporting ext2/3 in ext4 if ext4 is not configured 2009-12-21 10:54:09 -05:00
Makefile
acl.c sanitize xattr handler prototypes 2009-12-16 12:16:49 -05:00
acl.h
balloc.c
bitmap.c
block_validity.c ext4: remove unused #include <linux/version.h> 2009-12-14 09:24:20 -05:00
dir.c
ext4.h ext4: Calculate metadata requirements more accurately 2010-01-01 02:41:30 -05:00
ext4_extents.h ext4: Calculate metadata requirements more accurately 2010-01-01 02:41:30 -05:00
ext4_jbd2.c
ext4_jbd2.h
extents.c ext4: Calculate metadata requirements more accurately 2010-01-01 02:41:30 -05:00
file.c
fsync.c ext4, jbd2: Add barriers for file systems with exernal journals 2009-12-23 06:52:08 -05:00
hash.c
ialloc.c
inode.c ext4: Calculate metadata requirements more accurately 2010-01-01 02:41:30 -05:00
ioctl.c
mballoc.c ext4: Fix potential quota deadlock 2009-12-23 13:44:12 +01:00
mballoc.h ext4: remove unused #include <linux/version.h> 2009-12-14 09:24:20 -05:00
migrate.c
move_extent.c
namei.c
resize.c
super.c ext4: Calculate metadata requirements more accurately 2010-01-01 02:41:30 -05:00
symlink.c
xattr.c ext4: Eliminate potential double free on error path 2009-12-23 07:52:31 -05:00
xattr.h
xattr_security.c sanitize xattr handler prototypes 2009-12-16 12:16:49 -05:00
xattr_trusted.c sanitize xattr handler prototypes 2009-12-16 12:16:49 -05:00
xattr_user.c sanitize xattr handler prototypes 2009-12-16 12:16:49 -05:00