[Devel] [RH7 PATCH] ext4: ext4_split_extent_at should not cache tail extent

Dmitry Monakhov dmonakhov at openvz.org
Thu Dec 10 07:20:13 PST 2015


calltrace
collapse_range
 es_remove_extent => clear extent status tree
 remove_space
  ext4_split_extent_at => cache it again, ERROR because no one will cleanup it for us.
 shift_extents

TESTCASE:
xfs_io -f -d \
    -c "falloc -k 40k 80k " \
    -c "falloc -k 20k 100k " \
    -c "pwrite -S 0xaa -b 128k 64k 128k" \
    -c "fcollapse 0k 44k" \
    /mnt/t

Introduced by this commit: 6682179c7a7ef4368 (Flag was missed during port)
https://jira.sw.ru/browse/PSBM-40580

Signed-off-by: Dmitry Monakhov <dmonakhov at openvz.org>
---
 fs/ext4/extents.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/fs/ext4/extents.c b/fs/ext4/extents.c
index 3d288ba..499e6c8 100644
--- a/fs/ext4/extents.c
+++ b/fs/ext4/extents.c
@@ -300,7 +300,7 @@ ext4_force_split_extent_at(handle_t *handle, struct inode *inode,
 
 	return ext4_split_extent_at(handle, inode, path, lblk, unwritten ?
 			EXT4_EXT_MARK_UNWRIT1|EXT4_EXT_MARK_UNWRIT2 : 0,
-			EXT4_GET_BLOCKS_PRE_IO |
+			EXT4_EX_NOCACHE|EXT4_GET_BLOCKS_PRE_IO |
 			(nofail ? EXT4_GET_BLOCKS_METADATA_NOFAIL:0));
 }
 
-- 
1.7.1



More information about the Devel mailing list