diff options
| author | Zhang Yi <yi.zhang@huawei.com> | 2025-04-23 16:52:55 +0800 |
|---|---|---|
| committer | Theodore Ts'o <tytso@mit.edu> | 2025-05-14 10:42:13 -0400 |
| commit | 7871da20d484d5c7e536bfd52845b6be4488ff30 (patch) | |
| tree | 3a519a1b9c5744f33e942452c5aca23acab2c2ee /fs/ext4/ext4.h | |
| parent | 0b8e0bd45007d5740391e658c2581bd614207387 (diff) | |
ext4: introduce ext4_check_map_extents_env() debug helper
Loading and modifying the extents tree and extent status tree without
holding the inode's i_rwsem or the mapping's invalidate_lock is not
permitted, except during the I/O writeback. Add a new debug helper
ext4_check_map_extents_env(), it will verify whether the extent
loading/modifying context is safe.
Signed-off-by: Zhang Yi <yi.zhang@huawei.com>
Link: https://patch.msgid.link/20250423085257.122685-8-yi.zhang@huaweicloud.com
Signed-off-by: Theodore Ts'o <tytso@mit.edu>
Diffstat (limited to 'fs/ext4/ext4.h')
| -rw-r--r-- | fs/ext4/ext4.h | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/fs/ext4/ext4.h b/fs/ext4/ext4.h index 218a1e61547a..3f352f2a6d85 100644 --- a/fs/ext4/ext4.h +++ b/fs/ext4/ext4.h @@ -2978,6 +2978,7 @@ static inline bool ext4_mb_cr_expensive(enum criteria cr) void ext4_inode_csum_set(struct inode *inode, struct ext4_inode *raw, struct ext4_inode_info *ei); int ext4_inode_is_fast_symlink(struct inode *inode); +void ext4_check_map_extents_env(struct inode *inode); struct buffer_head *ext4_getblk(handle_t *, struct inode *, ext4_lblk_t, int); struct buffer_head *ext4_bread(handle_t *, struct inode *, ext4_lblk_t, int); int ext4_bread_batch(struct inode *inode, ext4_lblk_t block, int bh_count, |