diff mbox series

[f2fs-dev] f2fs: try to allocate sections from zoned area except file pinning

Message ID 20241028200953.2010714-1-daeho43@gmail.com (mailing list archive)
State New
Headers show
Series [f2fs-dev] f2fs: try to allocate sections from zoned area except file pinning | expand

Commit Message

Daeho Jeong Oct. 28, 2024, 8:09 p.m. UTC
From: Daeho Jeong <daehojeong@google.com>

We don't need to allocate blocks sequentially out of the section
boundary. Instead of that, try to allocate sections from zoned area as
many as possible, since conventional area should be used for file
pinning.

Signed-off-by: Daeho Jeong <daehojeong@google.com>
---
 fs/f2fs/segment.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

Comments

Chao Yu Oct. 29, 2024, 1:09 a.m. UTC | #1
On 2024/10/29 4:09, Daeho Jeong wrote:
> From: Daeho Jeong <daehojeong@google.com>
> 
> We don't need to allocate blocks sequentially out of the section
> boundary. Instead of that, try to allocate sections from zoned area as
> many as possible, since conventional area should be used for file
> pinning.
> 
> Signed-off-by: Daeho Jeong <daehojeong@google.com>

Reviewed-by: Chao Yu <chao@kernel.org>

Thanks,
diff mbox series

Patch

diff --git a/fs/f2fs/segment.c b/fs/f2fs/segment.c
index 1766254279d2..1d7d8744c32f 100644
--- a/fs/f2fs/segment.c
+++ b/fs/f2fs/segment.c
@@ -2711,7 +2711,7 @@  static int get_new_segment(struct f2fs_sb_info *sbi,
 		if (sbi->blkzone_alloc_policy == BLKZONE_ALLOC_PRIOR_CONV || pinning)
 			segno = 0;
 		else
-			segno = max(first_zoned_segno(sbi), *newseg);
+			segno = first_zoned_segno(sbi);
 		hint = GET_SEC_FROM_SEG(sbi, segno);
 	}
 #endif