Skip to contentSkip to conversation

f2fs: write missing last sum blk of file pinning section

PATCH Applied Daeho Jeong 3 participants 3 messages Apr 9, 2024 – Apr 14, 2024 F2FS file system

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 f2fs: write missing last sum blk of file pinning section

From: Daeho Jeong <[email protected]>

While do not allocating a new section in advance for file pinning area, I missed that we should write the sum block for the last segment of a file pinning section.

Fixes 9703d69d9d15 ("f2fs: support file pinning for zoned devices")
---
 fs/f2fs/segment.c | 2 ++
 1 file changed, 2 insertions(+)
fs/f2fs/segment.c +2 -0
index 4fd76e867e0a..6474b7338e81 100644
@@ -3559,6 +3559,8 @@ int f2fs_allocate_data_block(struct f2fs_sb_info *sbi, struct page *page,
 	if (segment_full) {
 		if (type == CURSEG_COLD_DATA_PINNED &&
 		    !((curseg->segno + 1) % sbi->segs_per_sec)) {
+			write_sum_page(sbi, curseg->sum_blk,
+					GET_SUM_BLOCK(sbi, curseg->segno));
 			reset_curseg_fields(curseg);
 			goto skip_new_segment;
 		}
Signature · 1 line
2.44.0.478.gd926399ef9-goog
#2 lore raw
In reply to Daeho Jeong
This patch was applied to jaegeuk/f2fs.git (dev) by Jaegeuk Kim <[email protected]>:

Hello:

This patch was applied to jaegeuk/f2fs.git (dev)
by Jaegeuk Kim <[email protected]>:

Quoted 10 lines · On Tue, 9 Apr 2024 16:34:11 -0700 you wrote:

From: Daeho Jeong <[email protected]>

While do not allocating a new section in advance for file pinning area, I missed that we should write the sum block for the last segment of a file pinning section.

Fixes 9703d69d9d15 ("f2fs: support file pinning for zoned devices")

[...]

Here is the summary with links:
- [f2fs-dev] f2fs: write missing last sum blk of file pinning section

    https://git.kernel.org/jaegeuk/f2fs/c/b084403cfc32

You are awesome, thank you!

Signature · 2 lines
Deet-doot-dot, I am a bot.
https://korg.docs.kernel.org/patchwork/pwbot.html