* [f2fs-dev] [PATCH v2 1/2] f2fs: add 'folio_in_bio' to handle readahead folios with no BIO submission
@ 2026-01-11 10:09 ` Nanzhe Zhao
0 siblings, 0 replies; 24+ messages in thread
From: Nanzhe Zhao @ 2026-01-11 10:09 UTC (permalink / raw)
To: Jaegeuk Kim, linux-f2fs-devel, linux-fsdevel; +Cc: Chao Yu, Nanzhe Zhao
f2fs_read_data_large_folio() can build a single read BIO across multiple
folios during readahead. If a folio ends up having none of its subpages
added to the BIO (e.g. all subpages are zeroed / treated as holes), it
will never be seen by f2fs_finish_read_bio(), so folio_end_read() is
never called. This leaves the folio locked and not marked uptodate.
Track whether the current folio has been added to a BIO via a local
'folio_in_bio' bool flag, and when iterating readahead folios, explicitly
mark the folio uptodate (on success) and unlock it when nothing was added.
Signed-off-by: Nanzhe Zhao <nzzhao@126.com>
---
fs/f2fs/data.c | 8 ++++++++
1 file changed, 8 insertions(+)
diff --git a/fs/f2fs/data.c b/fs/f2fs/data.c
index f32eb51ccee4..ddabcb1b9882 100644
--- a/fs/f2fs/data.c
+++ b/fs/f2fs/data.c
@@ -2436,6 +2436,7 @@ static int f2fs_read_data_large_folio(struct inode *inode,
unsigned nrpages;
struct f2fs_folio_state *ffs;
int ret = 0;
+ bool folio_in_bio;
if (!IS_IMMUTABLE(inode))
return -EOPNOTSUPP;
@@ -2451,6 +2452,7 @@ static int f2fs_read_data_large_folio(struct inode *inode,
if (!folio)
goto out;
+ folio_in_bio = false;
index = folio->index;
offset = 0;
ffs = NULL;
@@ -2536,6 +2538,7 @@ static int f2fs_read_data_large_folio(struct inode *inode,
offset << PAGE_SHIFT))
goto submit_and_realloc;
+ folio_in_bio = true;
inc_page_count(F2FS_I_SB(inode), F2FS_RD_DATA);
f2fs_update_iostat(F2FS_I_SB(inode), NULL, FS_DATA_READ_IO,
F2FS_BLKSIZE);
@@ -2545,6 +2548,11 @@ static int f2fs_read_data_large_folio(struct inode *inode,
}
trace_f2fs_read_folio(folio, DATA);
if (rac) {
+ if (!folio_in_bio) {
+ if (!ret)
+ folio_mark_uptodate(folio);
+ folio_unlock(folio);
+ }
folio = readahead_folio(rac);
goto next_folio;
}
--
2.34.1
^ permalink raw reply related [flat|nested] 24+ messages in thread* Re: [f2fs-dev] [PATCH v2 1/2] f2fs: add 'folio_in_bio' to handle readahead folios with no BIO submission
2026-01-11 10:09 ` Nanzhe Zhao
@ 2026-01-12 1:02 ` Chao Yu
-1 siblings, 0 replies; 24+ messages in thread
From: Chao Yu via Linux-f2fs-devel @ 2026-01-12 1:02 UTC (permalink / raw)
To: Nanzhe Zhao, Jaegeuk Kim, linux-f2fs-devel, linux-fsdevel
On 1/11/2026 6:09 PM, Nanzhe Zhao wrote:
> f2fs_read_data_large_folio() can build a single read BIO across multiple
> folios during readahead. If a folio ends up having none of its subpages
> added to the BIO (e.g. all subpages are zeroed / treated as holes), it
> will never be seen by f2fs_finish_read_bio(), so folio_end_read() is
> never called. This leaves the folio locked and not marked uptodate.
>
> Track whether the current folio has been added to a BIO via a local
> 'folio_in_bio' bool flag, and when iterating readahead folios, explicitly
> mark the folio uptodate (on success) and unlock it when nothing was added.
>
> Signed-off-by: Nanzhe Zhao <nzzhao@126.com>
> ---
> fs/f2fs/data.c | 8 ++++++++
> 1 file changed, 8 insertions(+)
>
> diff --git a/fs/f2fs/data.c b/fs/f2fs/data.c
> index f32eb51ccee4..ddabcb1b9882 100644
> --- a/fs/f2fs/data.c
> +++ b/fs/f2fs/data.c
> @@ -2436,6 +2436,7 @@ static int f2fs_read_data_large_folio(struct inode *inode,
> unsigned nrpages;
> struct f2fs_folio_state *ffs;
> int ret = 0;
> + bool folio_in_bio;
>
> if (!IS_IMMUTABLE(inode))
> return -EOPNOTSUPP;
> @@ -2451,6 +2452,7 @@ static int f2fs_read_data_large_folio(struct inode *inode,
> if (!folio)
> goto out;
>
> + folio_in_bio = false;
> index = folio->index;
> offset = 0;
> ffs = NULL;
> @@ -2536,6 +2538,7 @@ static int f2fs_read_data_large_folio(struct inode *inode,
> offset << PAGE_SHIFT))
> goto submit_and_realloc;
>
> + folio_in_bio = true;
> inc_page_count(F2FS_I_SB(inode), F2FS_RD_DATA);
> f2fs_update_iostat(F2FS_I_SB(inode), NULL, FS_DATA_READ_IO,
> F2FS_BLKSIZE);
> @@ -2545,6 +2548,11 @@ static int f2fs_read_data_large_folio(struct inode *inode,
> }
> trace_f2fs_read_folio(folio, DATA);
> if (rac) {
> + if (!folio_in_bio) {
> + if (!ret)
ret should never be true here?
Thanks,
> + folio_mark_uptodate(folio);
> + folio_unlock(folio);
> + }
> folio = readahead_folio(rac);
> goto next_folio;
> }
> --
> 2.34.1
>
_______________________________________________
Linux-f2fs-devel mailing list
Linux-f2fs-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/linux-f2fs-devel
^ permalink raw reply [flat|nested] 24+ messages in thread* Re: [f2fs-dev] [PATCH v2 1/2] f2fs: add 'folio_in_bio' to handle readahead folios with no BIO submission
@ 2026-01-12 1:02 ` Chao Yu
0 siblings, 0 replies; 24+ messages in thread
From: Chao Yu @ 2026-01-12 1:02 UTC (permalink / raw)
To: Nanzhe Zhao, Jaegeuk Kim, linux-f2fs-devel, linux-fsdevel; +Cc: chao
On 1/11/2026 6:09 PM, Nanzhe Zhao wrote:
> f2fs_read_data_large_folio() can build a single read BIO across multiple
> folios during readahead. If a folio ends up having none of its subpages
> added to the BIO (e.g. all subpages are zeroed / treated as holes), it
> will never be seen by f2fs_finish_read_bio(), so folio_end_read() is
> never called. This leaves the folio locked and not marked uptodate.
>
> Track whether the current folio has been added to a BIO via a local
> 'folio_in_bio' bool flag, and when iterating readahead folios, explicitly
> mark the folio uptodate (on success) and unlock it when nothing was added.
>
> Signed-off-by: Nanzhe Zhao <nzzhao@126.com>
> ---
> fs/f2fs/data.c | 8 ++++++++
> 1 file changed, 8 insertions(+)
>
> diff --git a/fs/f2fs/data.c b/fs/f2fs/data.c
> index f32eb51ccee4..ddabcb1b9882 100644
> --- a/fs/f2fs/data.c
> +++ b/fs/f2fs/data.c
> @@ -2436,6 +2436,7 @@ static int f2fs_read_data_large_folio(struct inode *inode,
> unsigned nrpages;
> struct f2fs_folio_state *ffs;
> int ret = 0;
> + bool folio_in_bio;
>
> if (!IS_IMMUTABLE(inode))
> return -EOPNOTSUPP;
> @@ -2451,6 +2452,7 @@ static int f2fs_read_data_large_folio(struct inode *inode,
> if (!folio)
> goto out;
>
> + folio_in_bio = false;
> index = folio->index;
> offset = 0;
> ffs = NULL;
> @@ -2536,6 +2538,7 @@ static int f2fs_read_data_large_folio(struct inode *inode,
> offset << PAGE_SHIFT))
> goto submit_and_realloc;
>
> + folio_in_bio = true;
> inc_page_count(F2FS_I_SB(inode), F2FS_RD_DATA);
> f2fs_update_iostat(F2FS_I_SB(inode), NULL, FS_DATA_READ_IO,
> F2FS_BLKSIZE);
> @@ -2545,6 +2548,11 @@ static int f2fs_read_data_large_folio(struct inode *inode,
> }
> trace_f2fs_read_folio(folio, DATA);
> if (rac) {
> + if (!folio_in_bio) {
> + if (!ret)
ret should never be true here?
Thanks,
> + folio_mark_uptodate(folio);
> + folio_unlock(folio);
> + }
> folio = readahead_folio(rac);
> goto next_folio;
> }
> --
> 2.34.1
>
^ permalink raw reply [flat|nested] 24+ messages in thread* Re: [f2fs-dev] [PATCH v2 1/2] f2fs: add 'folio_in_bio' to handle readahead folios with no BIO submission
2026-01-12 1:02 ` Chao Yu
@ 2026-01-12 8:52 ` Nanzhe Zhao
-1 siblings, 0 replies; 24+ messages in thread
From: Nanzhe Zhao @ 2026-01-12 8:52 UTC (permalink / raw)
To: Chao Yu; +Cc: linux-fsdevel, Jaegeuk Kim, linux-f2fs-devel
At 2026-01-12 09:02:48, "Chao Yu" <chao@kernel.org> wrote:
>> @@ -2545,6 +2548,11 @@ static int f2fs_read_data_large_folio(struct inode *inode,
>> }
>> trace_f2fs_read_folio(folio, DATA);
>> if (rac) {
>> + if (!folio_in_bio) {
>> + if (!ret)
>
>ret should never be true here?
>
>Thanks,
Yes.Need I send a v3 patch to remove the redundant check?
Thanks,
Nanzhe Zhao
_______________________________________________
Linux-f2fs-devel mailing list
Linux-f2fs-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/linux-f2fs-devel
^ permalink raw reply [flat|nested] 24+ messages in thread* Re:Re: [f2fs-dev] [PATCH v2 1/2] f2fs: add 'folio_in_bio' to handle readahead folios with no BIO submission
@ 2026-01-12 8:52 ` Nanzhe Zhao
0 siblings, 0 replies; 24+ messages in thread
From: Nanzhe Zhao @ 2026-01-12 8:52 UTC (permalink / raw)
To: Chao Yu; +Cc: Jaegeuk Kim, linux-f2fs-devel, linux-fsdevel
At 2026-01-12 09:02:48, "Chao Yu" <chao@kernel.org> wrote:
>> @@ -2545,6 +2548,11 @@ static int f2fs_read_data_large_folio(struct inode *inode,
>> }
>> trace_f2fs_read_folio(folio, DATA);
>> if (rac) {
>> + if (!folio_in_bio) {
>> + if (!ret)
>
>ret should never be true here?
>
>Thanks,
Yes.Need I send a v3 patch to remove the redundant check?
Thanks,
Nanzhe Zhao
^ permalink raw reply [flat|nested] 24+ messages in thread* Re: [f2fs-dev] [PATCH v2 1/2] f2fs: add 'folio_in_bio' to handle readahead folios with no BIO submission
2026-01-12 8:52 ` Nanzhe Zhao
@ 2026-01-12 9:24 ` Chao Yu
-1 siblings, 0 replies; 24+ messages in thread
From: Chao Yu via Linux-f2fs-devel @ 2026-01-12 9:24 UTC (permalink / raw)
To: Nanzhe Zhao; +Cc: linux-fsdevel, Jaegeuk Kim, linux-f2fs-devel
On 1/12/2026 4:52 PM, Nanzhe Zhao wrote:
>
> At 2026-01-12 09:02:48, "Chao Yu" <chao@kernel.org> wrote:
>>> @@ -2545,6 +2548,11 @@ static int f2fs_read_data_large_folio(struct inode *inode,
>>> }
>>> trace_f2fs_read_folio(folio, DATA);
>>> if (rac) {
>>> + if (!folio_in_bio) {
>>> + if (!ret)
>>
>> ret should never be true here?
>>
>> Thanks,
> Yes.Need I send a v3 patch to remove the redundant check?
Yes, I think so.
Thanks,
>
> Thanks,
> Nanzhe Zhao
_______________________________________________
Linux-f2fs-devel mailing list
Linux-f2fs-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/linux-f2fs-devel
^ permalink raw reply [flat|nested] 24+ messages in thread* Re: [f2fs-dev] [PATCH v2 1/2] f2fs: add 'folio_in_bio' to handle readahead folios with no BIO submission
@ 2026-01-12 9:24 ` Chao Yu
0 siblings, 0 replies; 24+ messages in thread
From: Chao Yu @ 2026-01-12 9:24 UTC (permalink / raw)
To: Nanzhe Zhao; +Cc: chao, Jaegeuk Kim, linux-f2fs-devel, linux-fsdevel
On 1/12/2026 4:52 PM, Nanzhe Zhao wrote:
>
> At 2026-01-12 09:02:48, "Chao Yu" <chao@kernel.org> wrote:
>>> @@ -2545,6 +2548,11 @@ static int f2fs_read_data_large_folio(struct inode *inode,
>>> }
>>> trace_f2fs_read_folio(folio, DATA);
>>> if (rac) {
>>> + if (!folio_in_bio) {
>>> + if (!ret)
>>
>> ret should never be true here?
>>
>> Thanks,
> Yes.Need I send a v3 patch to remove the redundant check?
Yes, I think so.
Thanks,
>
> Thanks,
> Nanzhe Zhao
^ permalink raw reply [flat|nested] 24+ messages in thread* Re: [f2fs-dev] [PATCH v2 1/2] f2fs: add 'folio_in_bio' to handle readahead folios with no BIO submission
2026-01-12 9:24 ` Chao Yu
@ 2026-01-13 17:05 ` Jaegeuk Kim
-1 siblings, 0 replies; 24+ messages in thread
From: Jaegeuk Kim via Linux-f2fs-devel @ 2026-01-13 17:05 UTC (permalink / raw)
To: Chao Yu; +Cc: linux-fsdevel, Nanzhe Zhao, linux-f2fs-devel
On 01/12, Chao Yu wrote:
> On 1/12/2026 4:52 PM, Nanzhe Zhao wrote:
> >
> > At 2026-01-12 09:02:48, "Chao Yu" <chao@kernel.org> wrote:
> > > > @@ -2545,6 +2548,11 @@ static int f2fs_read_data_large_folio(struct inode *inode,
> > > > }
> > > > trace_f2fs_read_folio(folio, DATA);
> > > > if (rac) {
> > > > + if (!folio_in_bio) {
> > > > + if (!ret)
> > >
> > > ret should never be true here?
> > >
> > > Thanks,
> > Yes.Need I send a v3 patch to remove the redundant check?
>
> Yes, I think so.
Applied in dev-test with it.
>
> Thanks,
>
> >
> > Thanks,
> > Nanzhe Zhao
_______________________________________________
Linux-f2fs-devel mailing list
Linux-f2fs-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/linux-f2fs-devel
^ permalink raw reply [flat|nested] 24+ messages in thread* Re: [f2fs-dev] [PATCH v2 1/2] f2fs: add 'folio_in_bio' to handle readahead folios with no BIO submission
@ 2026-01-13 17:05 ` Jaegeuk Kim
0 siblings, 0 replies; 24+ messages in thread
From: Jaegeuk Kim @ 2026-01-13 17:05 UTC (permalink / raw)
To: Chao Yu; +Cc: Nanzhe Zhao, linux-f2fs-devel, linux-fsdevel
On 01/12, Chao Yu wrote:
> On 1/12/2026 4:52 PM, Nanzhe Zhao wrote:
> >
> > At 2026-01-12 09:02:48, "Chao Yu" <chao@kernel.org> wrote:
> > > > @@ -2545,6 +2548,11 @@ static int f2fs_read_data_large_folio(struct inode *inode,
> > > > }
> > > > trace_f2fs_read_folio(folio, DATA);
> > > > if (rac) {
> > > > + if (!folio_in_bio) {
> > > > + if (!ret)
> > >
> > > ret should never be true here?
> > >
> > > Thanks,
> > Yes.Need I send a v3 patch to remove the redundant check?
>
> Yes, I think so.
Applied in dev-test with it.
>
> Thanks,
>
> >
> > Thanks,
> > Nanzhe Zhao
^ permalink raw reply [flat|nested] 24+ messages in thread* Re: [f2fs-dev] [PATCH v2 1/2] f2fs: add 'folio_in_bio' to handle readahead folios with no BIO submission
2026-01-13 17:05 ` Jaegeuk Kim
@ 2026-01-16 3:31 ` Nanzhe Zhao
-1 siblings, 0 replies; 24+ messages in thread
From: Nanzhe Zhao @ 2026-01-16 3:31 UTC (permalink / raw)
To: Jaegeuk Kim; +Cc: linux-fsdevel, linux-f2fs-devel
Hi Kim:
At 2026-01-14 01:05:35, "Jaegeuk Kim" <jaegeuk@kernel.org> wrote:
>On 01/12, Chao Yu wrote:
>> On 1/12/2026 4:52 PM, Nanzhe Zhao wrote:
>> >
>> > At 2026-01-12 09:02:48, "Chao Yu" <chao@kernel.org> wrote:
>> > > > @@ -2545,6 +2548,11 @@ static int f2fs_read_data_large_folio(struct inode *inode,
>> > > > }
>> > > > trace_f2fs_read_folio(folio, DATA);
>> > > > if (rac) {
>> > > > + if (!folio_in_bio) {
>> > > > + if (!ret)
>> > >
>> > > ret should never be true here?
>> > >
>> > > Thanks,
>> > Yes.Need I send a v3 patch to remove the redundant check?
>>
>> Yes, I think so.
>
>Applied in dev-test with it.
>
Thanks for apply!
As an aside, I noticed that f2fs_folio_state removed the uptodate bitmap. Do we need to
consider the case where a bio ends up with bi_status set to error (which could potentially
cause a large folio to be only partially read successfully)?
Also, is bio submission and the submit_and_realloc loop never fails ?
Thanks,
Nanzhe Zhao
_______________________________________________
Linux-f2fs-devel mailing list
Linux-f2fs-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/linux-f2fs-devel
^ permalink raw reply [flat|nested] 24+ messages in thread* Re:Re: [f2fs-dev] [PATCH v2 1/2] f2fs: add 'folio_in_bio' to handle readahead folios with no BIO submission
@ 2026-01-16 3:31 ` Nanzhe Zhao
0 siblings, 0 replies; 24+ messages in thread
From: Nanzhe Zhao @ 2026-01-16 3:31 UTC (permalink / raw)
To: Jaegeuk Kim; +Cc: Chao Yu, linux-f2fs-devel, linux-fsdevel
Hi Kim:
At 2026-01-14 01:05:35, "Jaegeuk Kim" <jaegeuk@kernel.org> wrote:
>On 01/12, Chao Yu wrote:
>> On 1/12/2026 4:52 PM, Nanzhe Zhao wrote:
>> >
>> > At 2026-01-12 09:02:48, "Chao Yu" <chao@kernel.org> wrote:
>> > > > @@ -2545,6 +2548,11 @@ static int f2fs_read_data_large_folio(struct inode *inode,
>> > > > }
>> > > > trace_f2fs_read_folio(folio, DATA);
>> > > > if (rac) {
>> > > > + if (!folio_in_bio) {
>> > > > + if (!ret)
>> > >
>> > > ret should never be true here?
>> > >
>> > > Thanks,
>> > Yes.Need I send a v3 patch to remove the redundant check?
>>
>> Yes, I think so.
>
>Applied in dev-test with it.
>
Thanks for apply!
As an aside, I noticed that f2fs_folio_state removed the uptodate bitmap. Do we need to
consider the case where a bio ends up with bi_status set to error (which could potentially
cause a large folio to be only partially read successfully)?
Also, is bio submission and the submit_and_realloc loop never fails ?
Thanks,
Nanzhe Zhao
^ permalink raw reply [flat|nested] 24+ messages in thread
* Re: [f2fs-dev] [PATCH v2 1/2] f2fs: add 'folio_in_bio' to handle readahead folios with no BIO submission
2026-01-13 17:05 ` Jaegeuk Kim
@ 2026-01-16 8:53 ` Chao Yu
-1 siblings, 0 replies; 24+ messages in thread
From: Chao Yu via Linux-f2fs-devel @ 2026-01-16 8:53 UTC (permalink / raw)
To: Jaegeuk Kim; +Cc: linux-fsdevel, Nanzhe Zhao, linux-f2fs-devel
On 1/14/2026 1:05 AM, Jaegeuk Kim wrote:
> On 01/12, Chao Yu wrote:
>> On 1/12/2026 4:52 PM, Nanzhe Zhao wrote:
>>>
>>> At 2026-01-12 09:02:48, "Chao Yu" <chao@kernel.org> wrote:
>>>>> @@ -2545,6 +2548,11 @@ static int f2fs_read_data_large_folio(struct inode *inode,
>>>>> }
>>>>> trace_f2fs_read_folio(folio, DATA);
>>>>> if (rac) {
>>>>> + if (!folio_in_bio) {
>>>>> + if (!ret)
>>>>
>>>> ret should never be true here?
>>>>
>>>> Thanks,
>>> Yes.Need I send a v3 patch to remove the redundant check?
>>
>> Yes, I think so.
>
> Applied in dev-test with it.
For upstreamed version,
Reviewed-by: Chao Yu <chao@kernel.org>
Thanks,
>
>>
>> Thanks,
>>
>>>
>>> Thanks,
>>> Nanzhe Zhao
_______________________________________________
Linux-f2fs-devel mailing list
Linux-f2fs-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/linux-f2fs-devel
^ permalink raw reply [flat|nested] 24+ messages in thread* Re: [f2fs-dev] [PATCH v2 1/2] f2fs: add 'folio_in_bio' to handle readahead folios with no BIO submission
@ 2026-01-16 8:53 ` Chao Yu
0 siblings, 0 replies; 24+ messages in thread
From: Chao Yu @ 2026-01-16 8:53 UTC (permalink / raw)
To: Jaegeuk Kim; +Cc: chao, Nanzhe Zhao, linux-f2fs-devel, linux-fsdevel
On 1/14/2026 1:05 AM, Jaegeuk Kim wrote:
> On 01/12, Chao Yu wrote:
>> On 1/12/2026 4:52 PM, Nanzhe Zhao wrote:
>>>
>>> At 2026-01-12 09:02:48, "Chao Yu" <chao@kernel.org> wrote:
>>>>> @@ -2545,6 +2548,11 @@ static int f2fs_read_data_large_folio(struct inode *inode,
>>>>> }
>>>>> trace_f2fs_read_folio(folio, DATA);
>>>>> if (rac) {
>>>>> + if (!folio_in_bio) {
>>>>> + if (!ret)
>>>>
>>>> ret should never be true here?
>>>>
>>>> Thanks,
>>> Yes.Need I send a v3 patch to remove the redundant check?
>>
>> Yes, I think so.
>
> Applied in dev-test with it.
For upstreamed version,
Reviewed-by: Chao Yu <chao@kernel.org>
Thanks,
>
>>
>> Thanks,
>>
>>>
>>> Thanks,
>>> Nanzhe Zhao
^ permalink raw reply [flat|nested] 24+ messages in thread
* Re: [f2fs-dev] [PATCH v2 1/2] f2fs: add 'folio_in_bio' to handle readahead folios with no BIO submission
2026-01-11 10:09 ` Nanzhe Zhao
@ 2026-01-13 18:32 ` Matthew Wilcox
-1 siblings, 0 replies; 24+ messages in thread
From: Matthew Wilcox @ 2026-01-13 18:32 UTC (permalink / raw)
To: Nanzhe Zhao; +Cc: linux-fsdevel, Jaegeuk Kim, linux-f2fs-devel
On Sun, Jan 11, 2026 at 06:09:40PM +0800, Nanzhe Zhao wrote:
> @@ -2545,6 +2548,11 @@ static int f2fs_read_data_large_folio(struct inode *inode,
> }
> trace_f2fs_read_folio(folio, DATA);
> if (rac) {
> + if (!folio_in_bio) {
> + if (!ret)
> + folio_mark_uptodate(folio);
> + folio_unlock(folio);
folio_end_read(folio, ret == 0);
surely?
_______________________________________________
Linux-f2fs-devel mailing list
Linux-f2fs-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/linux-f2fs-devel
^ permalink raw reply [flat|nested] 24+ messages in thread* Re: [f2fs-dev] [PATCH v2 1/2] f2fs: add 'folio_in_bio' to handle readahead folios with no BIO submission
@ 2026-01-13 18:32 ` Matthew Wilcox
0 siblings, 0 replies; 24+ messages in thread
From: Matthew Wilcox @ 2026-01-13 18:32 UTC (permalink / raw)
To: Nanzhe Zhao; +Cc: Jaegeuk Kim, linux-f2fs-devel, linux-fsdevel, Chao Yu
On Sun, Jan 11, 2026 at 06:09:40PM +0800, Nanzhe Zhao wrote:
> @@ -2545,6 +2548,11 @@ static int f2fs_read_data_large_folio(struct inode *inode,
> }
> trace_f2fs_read_folio(folio, DATA);
> if (rac) {
> + if (!folio_in_bio) {
> + if (!ret)
> + folio_mark_uptodate(folio);
> + folio_unlock(folio);
folio_end_read(folio, ret == 0);
surely?
^ permalink raw reply [flat|nested] 24+ messages in thread* Re: [f2fs-dev] [PATCH v2 1/2] f2fs: add 'folio_in_bio' to handle readahead folios with no BIO submission
2026-01-13 18:32 ` Matthew Wilcox
@ 2026-01-16 4:33 ` Jaegeuk Kim
-1 siblings, 0 replies; 24+ messages in thread
From: Jaegeuk Kim via Linux-f2fs-devel @ 2026-01-16 4:33 UTC (permalink / raw)
To: Matthew Wilcox; +Cc: linux-fsdevel, Nanzhe Zhao, linux-f2fs-devel
On 01/13, Matthew Wilcox wrote:
> On Sun, Jan 11, 2026 at 06:09:40PM +0800, Nanzhe Zhao wrote:
> > @@ -2545,6 +2548,11 @@ static int f2fs_read_data_large_folio(struct inode *inode,
> > }
> > trace_f2fs_read_folio(folio, DATA);
> > if (rac) {
> > + if (!folio_in_bio) {
> > + if (!ret)
> > + folio_mark_uptodate(folio);
> > + folio_unlock(folio);
>
> folio_end_read(folio, ret == 0);
Thanks.
https://lore.kernel.org/linux-f2fs-devel/20260116043203.2313943-1-jaegeuk@kernel.org/T/#u
>
> surely?
_______________________________________________
Linux-f2fs-devel mailing list
Linux-f2fs-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/linux-f2fs-devel
^ permalink raw reply [flat|nested] 24+ messages in thread* Re: [f2fs-dev] [PATCH v2 1/2] f2fs: add 'folio_in_bio' to handle readahead folios with no BIO submission
@ 2026-01-16 4:33 ` Jaegeuk Kim
0 siblings, 0 replies; 24+ messages in thread
From: Jaegeuk Kim @ 2026-01-16 4:33 UTC (permalink / raw)
To: Matthew Wilcox; +Cc: Nanzhe Zhao, linux-f2fs-devel, linux-fsdevel, Chao Yu
On 01/13, Matthew Wilcox wrote:
> On Sun, Jan 11, 2026 at 06:09:40PM +0800, Nanzhe Zhao wrote:
> > @@ -2545,6 +2548,11 @@ static int f2fs_read_data_large_folio(struct inode *inode,
> > }
> > trace_f2fs_read_folio(folio, DATA);
> > if (rac) {
> > + if (!folio_in_bio) {
> > + if (!ret)
> > + folio_mark_uptodate(folio);
> > + folio_unlock(folio);
>
> folio_end_read(folio, ret == 0);
Thanks.
https://lore.kernel.org/linux-f2fs-devel/20260116043203.2313943-1-jaegeuk@kernel.org/T/#u
>
> surely?
^ permalink raw reply [flat|nested] 24+ messages in thread