[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20200228152524.GE8036@magnolia>
Date: Fri, 28 Feb 2020 07:25:24 -0800
From: "Darrick J. Wong" <darrick.wong@...cle.com>
To: Ritesh Harjani <riteshh@...ux.ibm.com>
Cc: linux-ext4@...r.kernel.org, jack@...e.cz, tytso@....edu,
adilger.kernel@...ger.ca, linux-fsdevel@...r.kernel.org,
hch@...radead.org, cmaiolino@...hat.com, david@...morbit.com
Subject: Re: [PATCHv5 3/6] ext4: Move ext4 bmap to use iomap infrastructure.
On Fri, Feb 28, 2020 at 02:56:56PM +0530, Ritesh Harjani wrote:
> ext4_iomap_begin is already implemented which provides ext4_map_blocks,
> so just move the API from generic_block_bmap to iomap_bmap for iomap
> conversion.
>
> Signed-off-by: Ritesh Harjani <riteshh@...ux.ibm.com>
> Reviewed-by: Jan Kara <jack@...e.cz>
> ---
> fs/ext4/inode.c | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/fs/ext4/inode.c b/fs/ext4/inode.c
> index 6cf3b969dc86..81fccbae0aea 100644
> --- a/fs/ext4/inode.c
> +++ b/fs/ext4/inode.c
> @@ -3214,7 +3214,7 @@ static sector_t ext4_bmap(struct address_space *mapping, sector_t block)
> return 0;
> }
>
> - return generic_block_bmap(mapping, block, ext4_get_block);
> + return iomap_bmap(mapping, block, &ext4_iomap_ops);
/me notes that iomap_bmap will filemap_write_and_wait for you, so one
could optimize ext4_bmap to avoid the double-flush by moving the
filemap_write_and_wait at the top of the function into the JDATA state
clearing block.
OTOH it's bmap, who cares... :)
Reviewed-by: Darrick J. Wong <darrick.wong@...cle.com>
--D
> }
>
> static int ext4_readpage(struct file *file, struct page *page)
> --
> 2.21.0
>
Powered by blists - more mailing lists