[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <553c84d8-e0b3-4d02-a417-9e810142e8d6@kernel.org>
Date: Tue, 6 Jan 2026 17:16:42 +0800
From: Chao Yu <chao@...nel.org>
To: Nanzhe Zhao <nzzhao@....com>, Kim Jaegeuk <jaegeuk@...nel.org>
Cc: chao@...nel.org, linux-f2fs-devel@...ts.sourceforge.net,
linux-kernel@...r.kernel.org
Subject: Re: [PATCH v1 2/5] f2fs: Accounting large folio subpages before bio
submission
On 1/5/2026 11:30 PM, Nanzhe Zhao wrote:
> In f2fs_read_data_large_folio(), read_pages_pending is incremented only
> after the subpage has been added to the BIO. With a heavily fragmented
> file, each new subpage can force submission of the previous BIO.
>
> If the BIO completes quickly, f2fs_finish_read_bio() may decrement
> read_pages_pending to zero and call folio_end_read() while the read loop
> is still processing other subpages of the same large folio.
>
> Fix the ordering by incrementing read_pages_pending before any possible
> BIO submission for the current subpage, matching the iomap ordering and
> preventing premature folio_end_read().
>
> Signed-off-by: Nanzhe Zhao <nzzhao@....com>
Reviewed-by: Chao Yu <chao@...nel.org>
Thanks,
Powered by blists - more mailing lists