git: b3f46656393f - main - Invalidate inode extents cache on truncation.

Fedor Uporov fsu at FreeBSD.org
Fri May 7 07:28:31 UTC 2021


The branch main has been updated by fsu:

URL: https://cgit.FreeBSD.org/src/commit/?id=b3f46656393f5c8a6e8305afeb5e8c3638025c26

commit b3f46656393f5c8a6e8305afeb5e8c3638025c26
Author:     Fedor Uporov <fsu at FreeBSD.org>
AuthorDate: 2021-02-18 08:00:07 +0000
Commit:     Fedor Uporov <fsu at FreeBSD.org>
CommitDate: 2021-05-07 07:27:37 +0000

    Invalidate inode extents cache on truncation.
    
    It is needed to invalidate cache in case of inode space removal
    to avoid situation, when extents cache returns not exist extent.
    
    Reviewed by:    pfg
    MFC after:      2 weeks
    Differential Revision:  https://reviews.freebsd.org/D29931
---
 sys/fs/ext2fs/ext2_extents.c | 1 +
 1 file changed, 1 insertion(+)

diff --git a/sys/fs/ext2fs/ext2_extents.c b/sys/fs/ext2fs/ext2_extents.c
index cc77107785a5..2a3ffbd0e860 100644
--- a/sys/fs/ext2fs/ext2_extents.c
+++ b/sys/fs/ext2fs/ext2_extents.c
@@ -1623,5 +1623,6 @@ ext4_ext_remove_space(struct inode *ip, off_t length, int flags,
 	ext4_ext_drop_refs(path);
 	free(path, M_EXT2EXTENTS);
 
+	ip->i_ext_cache.ec_type = EXT4_EXT_CACHE_NO;
 	return (error);
 }


More information about the dev-commits-src-main mailing list