2020-02-26 09:57:52

by Ritesh Harjani

[permalink] [raw]
Subject: [PATCHv3 3/6] ext4: Move ext4 bmap to use iomap infrastructure.

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 <[email protected]>
---
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 3b4230cf0bc2..0f8a196d8a61 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);
}

static int ext4_readpage(struct file *file, struct page *page)
--
2.21.0


2020-02-26 12:32:46

by Jan Kara

[permalink] [raw]
Subject: Re: [PATCHv3 3/6] ext4: Move ext4 bmap to use iomap infrastructure.

On Wed 26-02-20 15:27:05, 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 <[email protected]>

Looks good to me. You can add:

Reviewed-by: Jan Kara <[email protected]>

Honza

> ---
> 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 3b4230cf0bc2..0f8a196d8a61 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);
> }
>
> static int ext4_readpage(struct file *file, struct page *page)
> --
> 2.21.0
>
--
Jan Kara <[email protected]>
SUSE Labs, CR