summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRitesh Harjani (IBM) <ritesh.list@gmail.com>2025-05-19 23:49:26 +0530
committerTheodore Ts'o <tytso@mit.edu>2025-05-20 14:21:00 -0400
commit3be4bb7e71477c0b9708bd6f1975db0ffc72cce4 (patch)
treedf90f3089c7e1474241d0bbe3f9ca56efad638c9
parente26268ff1dcae5662c1b96c35f18cfa6ab73d9de (diff)
ext4: Unwritten to written conversion requires EXT4_EX_NOCACHE
This fixes the atomic write patch series after it was rebased on top of extent status cache cleanup series i.e. 'commit 402e38e6b71f57 ("ext4: prevent stale extent cache entries caused by concurrent I/O writeback")' After the above series, EXT4_GET_BLOCKS_IO_CONVERT_EXT flag which has EXT4_GET_BLOCKS_IO_SUBMIT flag set, requires that the io submit context of any kind should pass EXT4_EX_NOCACHE to avoid caching unncecessary extents in the extent status cache. This patch fixes that by adding the EXT4_EX_NOCACHE flag in ext4_convert_unwritten_extents_atomic() for unwritten to written conversion calls to ext4_map_blocks(). Fixes: b86629c2b299 ("ext4: Add multi-fsblock atomic write support with bigalloc") Signed-off-by: Ritesh Harjani (IBM) <ritesh.list@gmail.com> Reviewed-by: Ojaswin Mujoo <ojaswin@linux.ibm.com> Link: https://patch.msgid.link/ea0ad9378ff6d31d73f4e53f87548e3a20817689.1747677758.git.ritesh.list@gmail.com Signed-off-by: Theodore Ts'o <tytso@mit.edu>
-rw-r--r--fs/ext4/extents.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/fs/ext4/extents.c b/fs/ext4/extents.c
index 74c16736ae34..c1de66c23dd2 100644
--- a/fs/ext4/extents.c
+++ b/fs/ext4/extents.c
@@ -4827,7 +4827,7 @@ int ext4_convert_unwritten_extents_atomic(handle_t *handle, struct inode *inode,
struct ext4_map_blocks map;
unsigned int blkbits = inode->i_blkbits;
unsigned int credits = 0;
- int flags = EXT4_GET_BLOCKS_IO_CONVERT_EXT;
+ int flags = EXT4_GET_BLOCKS_IO_CONVERT_EXT | EXT4_EX_NOCACHE;
map.m_lblk = offset >> blkbits;
max_blocks = EXT4_MAX_BLOCKS(len, offset, blkbits);