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

Konstantin Khorenko khorenko at virtuozzo.com
Sun Dec 13 22:09:35 PST 2015


The commit is pushed to "branch-rh7-3.10.0-229.7.2.vz7.9.x-ovz" and will appear at https://src.openvz.org/scm/ovz/vzkernel.git
after rh7-3.10.0-229.7.2.vz7.9.16
------>
commit 997ca8c91fc99a9596ec6715c1eb7e964dcc9d97
Author: Dmitry Monakhov <dmonakhov at openvz.org>
Date:   Mon Dec 14 10:09:35 2015 +0400

    ext4: ext4_split_extent_at should not cache tail extent
    
    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
    (ext4: update defragmentation codebase) - 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 file changed, 1 insertion(+), 1 deletion(-)

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));
 }
 


More information about the Devel mailing list