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

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



_______________________________________________
Linux-f2fs-devel mailing list
Linux-f2fs-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/linux-f2fs-devel

^ permalink raw reply related	[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 [f2fs-dev] [PATCH] f2fs: fix submit accounting for IPU writeback Seongjae Jeong
2026-10-19 11:09 ` Chao Yu via Linux-f2fs-devel
2026-10-19 15:31   ` Jaegeuk Kim via Linux-f2fs-devel
2026-10-19 15:40 ` patchwork-bot+f2fs--- via Linux-f2fs-devel

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.