Re: [PATCH] f2fs: avoid unnecessary reads in f2fs_update_meta_block()
From: Chao Yu
Date: Wed Oct 14 2026 - 00:46:57 EST
On 10/2/26 14:48, Seongjae Jeong wrote:
> When the packed SSA feature is enabled, f2fs_update_meta_block()
> uses f2fs_get_meta_cache_retry(), which reads the target block from
> disk if the cache entry is not uptodate.
>
> However, f2fs_update_meta_block() overwrites the entire filesystem
> block with memcpy(), so the existing contents are not needed.
> Partial updates to packed SSA blocks are handled separately in
> write_sum_block().
>
> Use f2fs_grab_meta_cache() unconditionally to avoid reading blocks
> that will be fully overwritten. Also remove the error check, since
> f2fs_grab_meta_cache() retries allocation failures internally and
> does not return an error pointer.
>
> Signed-off-by: Seongjae Jeong <jsjlee1020@xxxxxxxxx>
Reviewed-by: Chao Yu <chao@xxxxxxxxxx>
Thanks,