mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
* [PATCH] f2fs: fix submit accounting for IPU writeback
@ 2026-10-14 11:26 Seongjae Jeong
  2026-10-19 11:09 ` Chao Yu
  2026-10-19 15:40 ` patchwork-bot+f2fs
  0 siblings, 2 replies; 4+ messages in thread
From: Seongjae Jeong @ 2026-10-14 11:26 UTC (permalink / raw)
  To: jaegeuk, chao; +Cc: linux-f2fs-devel, linux-kernel, Seongjae Jeong

f2fs_write_cache_pages() uses the submitted count, which is set to
fio.submitted in f2fs_write_single_data_page(), to update nwritten
and decrement wbc->nr_to_write.

In the OPU path, f2fs_submit_page_write() sets fio->submitted to 1.
However, in the IPU path, fio->submitted is never set and remains zero.
As a result, successful IPU writes are not accounted for.
This can cause asynchronous writeback to continue beyond its budget.

Set fio->submitted in f2fs_inplace_write_data() after a page is
successfully merged into a bio or submitted, so that successful
IPU writes are included in the writeback accounting.

Signed-off-by: Seongjae Jeong <jsjlee1020@gmail.com>
---
 fs/f2fs/segment.c | 1 +
 1 file changed, 1 insertion(+)

diff --git a/fs/f2fs/segment.c b/fs/f2fs/segment.c
index 453f9284ec86..2e19124f1463 100644
--- a/fs/f2fs/segment.c
+++ b/fs/f2fs/segment.c
@@ -4298,6 +4298,7 @@ int f2fs_inplace_write_data(struct f2fs_io_info *fio)
 	else
 		err = f2fs_submit_page_bio(fio);
 	if (!err) {
+		fio->submitted = 1;
 		f2fs_update_device_state(fio->sbi, fio->ino,
 						fio->new_blkaddr, 1);
 		f2fs_update_iostat(fio->sbi, fio_inode(fio),
-- 
2.53.0


^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: [PATCH] f2fs: fix submit accounting for IPU writeback
  2026-10-14 11:26 [PATCH] f2fs: fix submit accounting for IPU writeback Seongjae Jeong
@ 2026-10-19 11:09 ` Chao Yu
  2026-10-19 15:31   ` [f2fs-dev] " Jaegeuk Kim
  2026-10-19 15:40 ` patchwork-bot+f2fs
  1 sibling, 1 reply; 4+ messages in thread
From: Chao Yu @ 2026-10-19 11:09 UTC (permalink / raw)
  To: Seongjae Jeong, jaegeuk; +Cc: chao, linux-f2fs-devel, linux-kernel

On 10/14/26 19:26, Seongjae Jeong wrote:
> f2fs_write_cache_pages() uses the submitted count, which is set to
> fio.submitted in f2fs_write_single_data_page(), to update nwritten
> and decrement wbc->nr_to_write.
> 
> In the OPU path, f2fs_submit_page_write() sets fio->submitted to 1.
> However, in the IPU path, fio->submitted is never set and remains zero.
> As a result, successful IPU writes are not accounted for.
> This can cause asynchronous writeback to continue beyond its budget.
> 
> Set fio->submitted in f2fs_inplace_write_data() after a page is
> successfully merged into a bio or submitted, so that successful
> IPU writes are included in the writeback accounting.
> 

Missing Fixes and Cc stable line?

> Signed-off-by: Seongjae Jeong <jsjlee1020@gmail.com>
Reviewed-by: Chao Yu <chao@kernel.org>

Thanks,

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: [f2fs-dev] [PATCH] f2fs: fix submit accounting for IPU writeback
  2026-10-19 11:09 ` Chao Yu
@ 2026-10-19 15:31   ` Jaegeuk Kim
  0 siblings, 0 replies; 4+ messages in thread
From: Jaegeuk Kim @ 2026-10-19 15:31 UTC (permalink / raw)
  To: Chao Yu; +Cc: Seongjae Jeong, linux-kernel, linux-f2fs-devel

On 10/19, Chao Yu via Linux-f2fs-devel wrote:
> On 10/14/26 19:26, Seongjae Jeong wrote:
> > f2fs_write_cache_pages() uses the submitted count, which is set to
> > fio.submitted in f2fs_write_single_data_page(), to update nwritten
> > and decrement wbc->nr_to_write.
> > 
> > In the OPU path, f2fs_submit_page_write() sets fio->submitted to 1.
> > However, in the IPU path, fio->submitted is never set and remains zero.
> > As a result, successful IPU writes are not accounted for.
> > This can cause asynchronous writeback to continue beyond its budget.
> > 
> > Set fio->submitted in f2fs_inplace_write_data() after a page is
> > successfully merged into a bio or submitted, so that successful
> > IPU writes are included in the writeback accounting.
> > 
> 
> Missing Fixes and Cc stable line?

    Cc: stable@kernel.org
    Fixes: d68f735b3bc9 ("f2fs: check io submission more precisely")

> 
> > Signed-off-by: Seongjae Jeong <jsjlee1020@gmail.com>
> Reviewed-by: Chao Yu <chao@kernel.org>
> 
> Thanks,
> 
> 
> _______________________________________________
> 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] 4+ messages in thread

* Re: [f2fs-dev] [PATCH] f2fs: fix submit accounting for IPU writeback
  2026-10-14 11:26 [PATCH] f2fs: fix submit accounting for IPU writeback Seongjae Jeong
  2026-10-19 11:09 ` Chao Yu
@ 2026-10-19 15:40 ` patchwork-bot+f2fs
  1 sibling, 0 replies; 4+ messages in thread
From: patchwork-bot+f2fs @ 2026-10-19 15:40 UTC (permalink / raw)
  To: Seongjae Jeong; +Cc: jaegeuk, chao, linux-kernel, linux-f2fs-devel

Hello:

This patch was applied to jaegeuk/f2fs.git (dev)
by Jaegeuk Kim <jaegeuk@kernel.org>:

On Wed, 14 Oct 2026 11:26:29 +0000 you wrote:
> f2fs_write_cache_pages() uses the submitted count, which is set to
> fio.submitted in f2fs_write_single_data_page(), to update nwritten
> and decrement wbc->nr_to_write.
> 
> In the OPU path, f2fs_submit_page_write() sets fio->submitted to 1.
> However, in the IPU path, fio->submitted is never set and remains zero.
> As a result, successful IPU writes are not accounted for.
> This can cause asynchronous writeback to continue beyond its budget.
> 
> [...]

Here is the summary with links:
  - [f2fs-dev] f2fs: fix submit accounting for IPU writeback
    https://git.kernel.org/jaegeuk/f2fs/c/6d1f622b9c06

You are awesome, thank you!
-- 
Deet-doot-dot, I am a bot.
https://korg.docs.kernel.org/patchwork/pwbot.html



^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2026-10-19 15:40 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2026-10-14 11:26 [PATCH] f2fs: fix submit accounting for IPU writeback Seongjae Jeong
2026-10-19 11:09 ` Chao Yu
2026-10-19 15:31   ` [f2fs-dev] " Jaegeuk Kim
2026-10-19 15:40 ` patchwork-bot+f2fs

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®