Re:Re: [PATCH v5 09/16] f2fs: optimize small block size large folio read
From: Nanzhe Zhao
Date: Tue Oct 20 2026 - 22:25:54 EST
>
>Oops, sorry, I didn't notice there is unnecessary f2fs_truncate_meta_caches()
>in f2fs_wait_on_block_writeback_range(), so still we'd better just use
>f2fs_wait_on_block_writeback here?
>
> void f2fs_wait_on_block_writeback_range(struct inode *inode, block_t blkaddr,
> block_t len)
> {
> struct f2fs_sb_info *sbi = F2FS_I_SB(inode);
> block_t i;
>
> if (!f2fs_meta_inode_gc_required(inode))
> return;
>
> for (i = 0; i < len; i++)
> f2fs_wait_on_block_writeback(inode, blkaddr + i);
>
> f2fs_truncate_meta_caches(sbi, blkaddr, len); <------------
> }
>
>Thanks,
>
I have checked the commit history of f2fs_wait_on_block_writeback_range....
It seems f2fs_truncate_meta_caches is used to invalidate old dirty meta data to
prevent data corruption for DIO case. But I think now the helper's name is quite
misleading here.................. We may need a cleanup patch for this future.