Skip to contentSkip to conversation

f2fs: forcibly migrate to secure space for zoned device file pinning

PATCH Superseded Daeho Jeong 2 participants 3 messages Sep 11, 2024 – Sep 12, 2024 F2FS file system

v1 of 2 Superseded Latest is v2 →

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 f2fs: forcibly migrate to secure space for zoned device file pinning

From: Daeho Jeong <[email protected]>

We need to migrate data blocks even though it is full to secure space for zoned device file pinning.

Fixes 9703d69d9d15 ("f2fs: support file pinning for zoned devices")
---
 fs/f2fs/gc.c | 3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)
fs/f2fs/gc.c +1 -2
index 724bbcb447d3..aaae13493a70 100644
@@ -2010,8 +2010,7 @@ int f2fs_gc_range(struct f2fs_sb_info *sbi,
 			.iroot = RADIX_TREE_INIT(gc_list.iroot, GFP_NOFS),
 		};
 
-		do_garbage_collect(sbi, segno, &gc_list, FG_GC,
-						dry_run_sections == 0);
+		do_garbage_collect(sbi, segno, &gc_list, FG_GC, true);
 		put_gc_inode(&gc_list);
 
 		if (!dry_run && get_valid_blocks(sbi, segno, true))
Signature · 1 line
2.46.0.598.g6f2099f65c-goog
maintainer
#1 lore raw
Quoted 16 lines · Daeho Jeong

From: Daeho Jeong <[email protected]>

We need to migrate data blocks even though it is full to secure space for zoned device file pinning.

Fixes 9703d69d9d15 ("f2fs: support file pinning for zoned devices")
---
 fs/f2fs/gc.c | 3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)
fs/f2fs/gc.c +0 -0
index 724bbcb447d3..aaae13493a70 100644

fs/f2fs/gc.c int f2fs_gc_range(struct f2fs_sb_info *sbi, · line 2013

Quoted 6 lines
fs/f2fs/gc.c +1 -2
@@ -2010,8 +2010,7 @@ int f2fs_gc_range(struct f2fs_sb_info *sbi,
 			.iroot = RADIX_TREE_INIT(gc_list.iroot, GFP_NOFS),
 		};
 
-		do_garbage_collect(sbi, segno, &gc_list, FG_GC,
-						dry_run_sections == 0);
+		do_garbage_collect(sbi, segno, &gc_list, FG_GC, true);

Do you mean this, right?

do_garbage_collect(sbi, segno, &gc_list, FG_GC, true, false);

Quoted 6 lines
fs/f2fs/gc.c +0 -0
 		put_gc_inode(&gc_list);
 
 		if (!dry_run && get_valid_blocks(sbi, segno, true))
Signature · 1 line
2.46.0.598.g6f2099f65c-goog
#2 lore raw
Quoted 21 lines · Jaegeuk Kim
Quoted 19 lines · Daeho Jeong

From: Daeho Jeong <[email protected]>

We need to migrate data blocks even though it is full to secure space for zoned device file pinning.

Fixes 9703d69d9d15 ("f2fs: support file pinning for zoned devices")
---
 fs/f2fs/gc.c | 3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)
fs/f2fs/gc.c +0 -0
index 724bbcb447d3..aaae13493a70 100644
@@ -2010,8 +2010,7 @@ int f2fs_gc_range(struct f2fs_sb_info *sbi,
                      .iroot = RADIX_TREE_INIT(gc_list.iroot, GFP_NOFS),
              };
 
Quoted 7 lines

fs/f2fs/gc.c int f2fs_gc_range(struct f2fs_sb_info *sbi, · line 2013

Quoted 3 lines
fs/f2fs/gc.c +1 -2
-             do_garbage_collect(sbi, segno, &gc_list, FG_GC,
-                                             dry_run_sections == 0);
+             do_garbage_collect(sbi, segno, &gc_list, FG_GC, true);

Do you mean this, right?

do_garbage_collect(sbi, segno, &gc_list, FG_GC, true, false);

Oh, after ZUFS GC patches, we have six parameters on that. You're right.

static int do_garbage_collect(struct f2fs_sb_info *sbi,
unsigned int start_segno, struct gc_inode_list *gc_list, int gc_type, bool force_migrate)

Quoted 7 lines
Quoted 7 lines
fs/f2fs/gc.c +0 -1
              put_gc_inode(&gc_list);
 
              if (!dry_run && get_valid_blocks(sbi, segno, true))
--

2.46.0.598.g6f2099f65c-goog