linux-kernel-test/fs/ext4
Mingming Cao a02908f19c ext4: journal credits calulation cleanup and fix for non-extent writepage
When considering how many journal credits are needed for modifying a
chunk of data, we need to account for the super block, inode block,
quota blocks and xattr block, indirect/index blocks, also, group bitmap
and group descriptor blocks for new allocation (including data and
indirect/index blocks). There are many places in ext4 do the calculation
on their own and often missed one or two meta blocks, and often they
assume single block allocation, and did not considering the multile
chunk of allocation case.

This patch is trying to cleanup current journal credit code, provides
some common helper funtion to calculate the journal credits, to be used
for writepage, writepages, DIO, fallocate, migration, defrag, and for
both nonextent and extent files.

This patch modified the writepage/write_begin credit caculation for
nonextent files, to use the new helper function. It also fixed the
problem that writepage on nonextent files did not consider the case
blocksize <pagesize, thus could possibelly need multiple block
allocation in a single transaction.

Signed-off-by: Mingming Cao <cmm@us.ibm.com>
Reviewed-by: Aneesh Kumar K.V <aneesh.kumar@linux.vnet.ibm.com>
Signed-off-by: "Theodore Ts'o" <tytso@mit.edu>
2008-08-19 22:16:07 -04:00
..
acl.c [PATCH] sanitize ->permission() prototype 2008-07-26 20:53:14 -04:00
acl.h [PATCH] sanitize ->permission() prototype 2008-07-26 20:53:14 -04:00
balloc.c ext4: lock block groups when initializing 2008-08-02 21:21:08 -04:00
bitmap.c ext4: move headers out of include/linux 2008-04-29 18:13:32 -04:00
dir.c ext4: Fix ext4_dx_readdir hash collision handling 2008-08-19 21:57:43 -04:00
ext4_extents.h ext4: delayed allocation ENOSPC handling 2008-07-14 17:52:37 -04:00
ext4_i.h ext4: delayed allocation ENOSPC handling 2008-07-14 17:52:37 -04:00
ext4_jbd2.c ext4: move headers out of include/linux 2008-04-29 18:13:32 -04:00
ext4_jbd2.h ext4: journal credits calulation cleanup and fix for non-extent writepage 2008-08-19 22:16:07 -04:00
ext4_sb.h ext4: New inode allocation for FLEX_BG meta-data groups. 2008-07-11 19:27:31 -04:00
ext4.h ext4: journal credits calulation cleanup and fix for non-extent writepage 2008-08-19 22:16:07 -04:00
extents.c ext4: Use ext4_discard_reservations instead of mballoc-specific call 2008-08-16 07:57:35 -04:00
file.c ext4: delayed allocation i_blocks fix for stat 2008-07-11 19:27:31 -04:00
fsync.c ext4: call blkdev_issue_flush on fsync 2008-07-11 19:27:31 -04:00
group.h ext4: Rename read_block_bitmap() to ext4_read_block_bitmap() 2008-07-11 19:27:31 -04:00
hash.c ext4: move headers out of include/linux 2008-04-29 18:13:32 -04:00
ialloc.c ext4: Fix bug where we return ENOSPC even though we have plenty of inodes 2008-08-19 22:19:50 -04:00
inode.c ext4: journal credits calulation cleanup and fix for non-extent writepage 2008-08-19 22:16:07 -04:00
ioctl.c ext4: move headers out of include/linux 2008-04-29 18:13:32 -04:00
Makefile
mballoc.c ext4: Don't allow lg prealloc list to be grow large. 2008-07-23 14:14:05 -04:00
mballoc.h ext4: Don't allow lg prealloc list to be grow large. 2008-07-23 14:14:05 -04:00
migrate.c ext4: move headers out of include/linux 2008-04-29 18:13:32 -04:00
namei.c ext4: cleanup never-used magic numbers from htree code 2008-07-11 19:27:31 -04:00
namei.h
resize.c ext4: don't try to resize if there are no reserved gdt blocks left 2008-08-19 22:13:41 -04:00
super.c Merge branch 'for_linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tytso/ext4 2008-08-03 10:50:44 -07:00
symlink.c ext4: move headers out of include/linux 2008-04-29 18:13:32 -04:00
xattr_security.c ext4: move headers out of include/linux 2008-04-29 18:13:32 -04:00
xattr_trusted.c ext4: remove double definitions of xattr macros 2008-07-11 19:27:31 -04:00
xattr_user.c ext4: remove double definitions of xattr macros 2008-07-11 19:27:31 -04:00
xattr.c ext4: Cleanup whitespace and other miscellaneous style issues 2008-07-26 16:15:44 -04:00
xattr.h ext4: make ext4_xattr_list() static 2008-04-17 10:38:59 -04:00