linux-stable-rt/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
..
Makefile
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
bitmap.c
dir.c ext4: Fix ext4_dx_readdir hash collision handling 2008-08-19 21:57:43 -04:00
ext4.h ext4: journal credits calulation cleanup and fix for non-extent writepage 2008-08-19 22:16:07 -04:00
ext4_extents.h ext4: delayed allocation ENOSPC handling 2008-07-14 17:52:37 -04:00
ext4_i.h
ext4_jbd2.c
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
extents.c ext4: Use ext4_discard_reservations instead of mballoc-specific call 2008-08-16 07:57:35 -04:00
file.c
fsync.c
group.h
hash.c
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
mballoc.c
mballoc.h
migrate.c
namei.c
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
xattr.c
xattr.h
xattr_security.c
xattr_trusted.c
xattr_user.c