Re: [f2fs-dev] [PATCH v2 11/20] f2fs: support subpage blocks in move range

From: Chao Yu

Date: Tue Nov 17 2026 - 06:22:35 EST


On 11/16/26 12:08, Daeho Jeong wrote:
> From: Daeho Jeong <daehojeong@xxxxxxxxxx>
>
> Folios at both ends of the moved ranges can straddle the range
> boundaries. Write back and truncate the page cache from PAGE_SIZE
> boundaries, and hold invalidate_lock of both inodes during the exchange
> so that faults and readahead cannot bring back stale data. After the
> exchange, also after one that failed part way, drop the source blocks
> that it read into the page cache, and call pagecache_isize_extended()
> for the gap between the old EOF of dst and the moved data. The page
> cache was not truncated before, so this also applies when the block
> size equals PAGE_SIZE. Remove the -EOPNOTSUPP check.
>
> Zero the cached data past the old EOF of dst with
> f2fs_zero_post_eof_page() before the move extends dst over it, as the
> other paths that extend a file do. Otherwise data stored past EOF
> through a mapping becomes file data. This also applies when the block
> size equals PAGE_SIZE.
>
> Signed-off-by: Daeho Jeong <daehojeong@xxxxxxxxxx>
Reviewed-by: Chao Yu <chao@xxxxxxxxxx>

Thanks,