git: 43cb7f0f489e - stable/13 - Invalidate inode extents cache on truncation.

Ed Maste <[email protected]>
Newsgroups gmane.os.freebsd.devel.cvs.src,gmane.os.freebsd.devel.stable.scm
Message-ID <[email protected]>
The branch stable/13 has been updated by emaste:

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

commit 43cb7f0f489e422fefe0ce37fba4f34176ce2649
Author:     Fedor Uporov <[email protected]>
AuthorDate: 2021-02-18 08:00:07 +0000
Commit:     Ed Maste <[email protected]>
CommitDate: 2026-06-24 17:56:47 +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
    
    (cherry picked from commit b3f46656393f5c8a6e8305afeb5e8c3638025c26)
---
 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 431e6afdc47b..e764d2e6846f 100644
--- a/sys/fs/ext2fs/ext2_extents.c
+++ b/sys/fs/ext2fs/ext2_extents.c
@@ -1579,5 +1579,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);
 }
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.