From: Mingming Cao Date: Wed, 20 Aug 2008 02:16:03 +0000 (-0400) Subject: ext4: journal credits reservation fixes for DIO, fallocate X-Git-Tag: v2.6.27-rc5~46^2~6 X-Git-Url: http://git.openpandora.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=f3bd1f3fa8ca7ec70cfd87aa94dc5e1a260901f2;p=pandora-kernel.git 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 Reviewed-by: Aneesh Kumar K.V Signed-off-by: "Theodore Ts'o" --- Reading git-diff-tree failed