f2fs: fix using wrong 'submitted' value in f2fs_write_cache_pages
PATCH v4 1/1 f2fs: fix using wrong 'submitted' value in f2fs_write_cache_pages
From: zangyangyang1 <[email protected]>
When f2fs_write_single_data_page fails, f2fs_write_cache_pages will use the last 'submitted' value incorrectly, which will cause 'nwritten' and 'wbc->nr_to_write' calculation errors
---
v4: The Callers initializes it
v3: No logical changes, just format patch
v2: Initialize "submitted" in f2fs_write_single_data_page()
--- fs/f2fs/compress.c | 1 + fs/f2fs/data.c | 1 + 2 files changed, 2 insertions(+)
fs/f2fs/compress.c +1 -0
@@ -1551,6 +1551,7 @@ static int f2fs_write_raw_pages(struct compress_ctx *cc,if (!clear_page_dirty_for_io (cc->rpages[i])) goto continue_unlock; + submitted =0 ; ret = f2fs_write_single_data_page(page_folio(cc->rpages[i]), &submitted, NULL, NULL, wbc, io_type,
fs/f2fs/data.c +1 -0
@@ -3150,6 +3150,7 @@ static int f2fs_write_cache_pages(struct address_space *mapping, continue; }#endif + submitted =0 ; ret =f2fs_write_single_data_page (folio, &submitted, &bio, &last_block, wbc, io_type,0 , true);
Signature · 8 lines
2.43.2 _______________________________________________ Linux-f2fs-devel mailing list [email protected] https://lists.sourceforge.net/lists/listinfo/linux-f2fs-devel
Quoted 7 lines · YangYang Zang
From: zangyangyang1 <[email protected]>
When
f2fs_write_single_data_pagefails,f2fs_write_cache_pageswill use the last 'submitted' value incorrectly, which will cause 'nwritten' and 'wbc->nr_to_write' calculation errorsSigned-off-by zangyangyang1 <[email protected]>
Thanks,
_______________________________________________
Linux-f2fs-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/linux-f2fs-devel
Hello:
This patch was applied to jaegeuk/f2fs.git (dev)
by Jaegeuk Kim <[email protected]>:
Quoted 9 lines · On Mon, 13 Jan 2025 11:05:18 +0800 you wrote:
From: zangyangyang1 <[email protected]>
When
f2fs_write_single_data_pagefails,f2fs_write_cache_pageswill use the last 'submitted' value incorrectly, which will cause 'nwritten' and 'wbc->nr_to_write' calculation errorsSigned-off-by zangyangyang1 <[email protected]>[...]
Here is the summary with links:
- [f2fs-dev,v4] f2fs: fix using wrong 'submitted' value in f2fs_write_cache_pages
https://git.kernel.org/jaegeuk/f2fs/c/c84c2424932d
You are awesome, thank you!
Signature · 10 lines
Deet-doot-dot, I am a bot. https://korg.docs.kernel.org/patchwork/pwbot.html _______________________________________________ Linux-f2fs-devel mailing list [email protected] https://lists.sourceforge.net/lists/listinfo/linux-f2fs-devel