Re: [f2fs-dev] [PATCH v2 08/14] f2fs: optimize small block size large folio read

From: Nanzhe Zhao

Date: Tue Sep 22 2026 - 22:42:33 EST


On Tue, 15 Sep 2026 21:33:15 -0700, Daeho Jeong wrote:
> 1. read_blocks_pending underflow: If a folio already has ffs attached
> (from previous writes/holes/reads), whole_folio_in_bio skips
> incrementing read_blocks_pending. When the BIO completes,
> f2fs_finish_read_bio() still decrements it, underflowing the counter.
> 2. BIO split risk: If a large folio BIO gets split by the block/crypto
> layer, f2fs_finish_read_bio() would call folio_end_read() prematurely
> on the first completing piece.

Hi Daeho,

Thanks for pointing this out.

It seems I need to drop the whole_folio_in_bio change in the next version.
(BIO splitting at the block layer can only be solved by read_pages_pending.)

I understand that in that case I'd better re-measure the I/O performance of
the whole patch series for the next version?

Thanks!
--
Nanzhe Zhao