[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <aCyTNqnZIB2me_MS@li-dc0c254c-257c-11b2-a85c-98b6c1322444.ibm.com>
Date: Tue, 20 May 2025 20:06:08 +0530
From: Ojaswin Mujoo <ojaswin@...ux.ibm.com>
To: "Ritesh Harjani (IBM)" <ritesh.list@...il.com>
Cc: linux-ext4@...r.kernel.org, "Theodore Ts'o" <tytso@....edu>,
Jan Kara <jack@...e.cz>, John Garry <john.g.garry@...cle.com>,
djwong@...nel.org, linux-fsdevel@...r.kernel.org
Subject: Re: [PATCH v1 1/5] ext4: Unwritten to written conversion requires
EXT4_EX_NOCACHE
On Mon, May 19, 2025 at 11:49:26PM +0530, Ritesh Harjani (IBM) wrote:
> 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: ba601987dbb4 ("ext4: Add multi-fsblock atomic write support with bigalloc")
> Signed-off-by: Ritesh Harjani (IBM) <ritesh.list@...il.com>
> ---
> fs/ext4/extents.c | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/fs/ext4/extents.c b/fs/ext4/extents.c
> index 8b834e13d306..7683558381dc 100644
> --- a/fs/ext4/extents.c
> +++ b/fs/ext4/extents.c
> @@ -4826,7 +4826,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;
Makes sense, feel free to add:
Reviewed-by: Ojaswin Mujoo <ojaswin@...ux.ibm.com>
Thanks,
ojaswin
>
> map.m_lblk = offset >> blkbits;
> max_blocks = EXT4_MAX_BLOCKS(len, offset, blkbits);
> --
> 2.49.0
>
Powered by blists - more mailing lists