Re: [PATCH] f2fs: get rid of buffer_head use

From: Chao Yu
Date: Thu Jun 06 2024 - 09:22:23 EST


On 2024/6/6 20:38, Matthew Wilcox wrote:
On Thu, Jun 06, 2024 at 05:50:37PM +0800, Chao Yu wrote:
For later folio conversion.

What tree is this against?

Last dev-test branch of f2fs git tree, I guess it's a little behind
to linus' tree.


@@ -3957,32 +3976,32 @@ static int read_raw_super_block(struct f2fs_sb_info *sbi,
return -ENOMEM;
for (block = 0; block < 2; block++) {
- bh = sb_bread(sb, block);
- if (!bh) {
+ page = read_mapping_page(sb->s_bdev->bd_inode->i_mapping,
+ block, NULL);

You need to use bd_mapping, not bd_inode->i_mapping (since May 21 in
Linus' tree).

Will update it once f2fs codebase was rebased to linus' tree.


And I don't think there's much point in switching to pages as an
intermediate step. You may as well go straight to folios.

folio = read_mapping_folio(sb->s_bdev->bd_mapping, block, NULL);

Fine, let me work on this in v2.

Thanks,