]> pilppa.com Git - linux-2.6-omap-h63xx.git/commit
ext4: journal credits reservation fixes for DIO, fallocate
authorMingming Cao <cmm@us.ibm.com>
Wed, 20 Aug 2008 02:16:03 +0000 (22:16 -0400)
committerTheodore Ts'o <tytso@mit.edu>
Wed, 20 Aug 2008 02:16:03 +0000 (22:16 -0400)
commitf3bd1f3fa8ca7ec70cfd87aa94dc5e1a260901f2
treea0f0ce2e044f8a75009e94d5f788b45a3948bbe3
parentee12b630687d510f6f4b6d4acdc4e267fd4adeda
ext4: journal credits reservation fixes for DIO, fallocate

DIO and fallocate credit calculation is different than writepage, as
they do start a new journal right for each call to ext4_get_blocks_wrap().
This patch uses the helper function in DIO and fallocate case, passing
a flag indicating that the modified data are contigous thus could account
less indirect/index blocks.

This patch also fixed the journal credit reservation for direct I/O
(DIO).  Previously the estimated credits for DIO only was calculated for
non-extent files, which was not enough if the file is extent-based.

Also fixed was fallocate double-counting credits for modifying the the
superblock.

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>
fs/ext4/ext4.h
fs/ext4/extents.c
fs/ext4/inode.c