diff options
author | Zhang Yi <yi.zhang@huawei.com> | 2024-08-13 20:34:45 +0800 |
---|---|---|
committer | Theodore Ts'o <tytso@mit.edu> | 2024-09-02 15:26:14 -0400 |
commit | f3baf33b9cae0e00fe1870abca952d5dfea53dc6 (patch) | |
tree | 5ab6d86ed1bb045796da2bedf01084b61bc11e58 /fs/ext4/extents.c | |
parent | fccd632670408ab3066712aa90cc972b18d1b617 (diff) |
ext4: passing block allocation information to ext4_es_insert_extent()
Just pass the block allocation flag to ext4_es_insert_extent() when we
replacing a current extent after an actually block allocation or extent
status conversion, this flag will be used by later changes.
Suggested-by: Jan Kara <jack@suse.cz>
Signed-off-by: Zhang Yi <yi.zhang@huawei.com>
Link: https://patch.msgid.link/20240813123452.2824659-6-yi.zhang@huaweicloud.com
Signed-off-by: Theodore Ts'o <tytso@mit.edu>
Diffstat (limited to 'fs/ext4/extents.c')
-rw-r--r-- | fs/ext4/extents.c | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/fs/ext4/extents.c b/fs/ext4/extents.c index e067f2dd0335..671dacd7c873 100644 --- a/fs/ext4/extents.c +++ b/fs/ext4/extents.c @@ -3113,7 +3113,7 @@ static void ext4_zeroout_es(struct inode *inode, struct ext4_extent *ex) return; ext4_es_insert_extent(inode, ee_block, ee_len, ee_pblock, - EXTENT_STATUS_WRITTEN); + EXTENT_STATUS_WRITTEN, 0); } /* FIXME!! we need to try to merge to left or right after zero-out */ @@ -4097,7 +4097,8 @@ again: insert_hole: /* Put just found gap into cache to speed up subsequent requests */ ext_debug(inode, " -> %u:%u\n", hole_start, len); - ext4_es_insert_extent(inode, hole_start, len, ~0, EXTENT_STATUS_HOLE); + ext4_es_insert_extent(inode, hole_start, len, ~0, + EXTENT_STATUS_HOLE, 0); /* Update hole_len to reflect hole size after lblk */ if (hole_start != lblk) |