Re: [f2fs-dev] [PATCH] f2fs: fix to use correct segment type in f2fs_allocate_data_block()

2024-02-23 Thread Chao Yu
On 2024/2/24 4:52, Jaegeuk Kim wrote: On 02/23, Chao Yu wrote: @type in f2fs_allocate_data_block() indicates log header's type, it can be CURSEG_COLD_DATA_PINNED or CURSEG_ALL_DATA_ATGC, rather than type of data/node, however IS_DATASEG()/IS_NODESEG() only accept later one, fix it. Fixes:

Re: [f2fs-dev] [PATCH v2] mkfs.f2fs: should give section-aligned reserved segments

2024-02-23 Thread Jaegeuk Kim
The reserved segments should be aligned to the section boundary. Signed-off-by: Jaegeuk Kim --- v2: - fix bug include/f2fs_fs.h | 12 +++- 1 file changed, 7 insertions(+), 5 deletions(-) diff --git a/include/f2fs_fs.h b/include/f2fs_fs.h index 9056e02acd29..fc56396fa358 100644

[f2fs-dev] [PATCH] mkfs.f2fs: should give section-aligned reserved segments

2024-02-23 Thread Jaegeuk Kim
The reserved segments should be aligned to the section boundary. Signed-off-by: Jaegeuk Kim --- include/f2fs_fs.h | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/include/f2fs_fs.h b/include/f2fs_fs.h index 9056e02acd29..2e93503cada9 100644 --- a/include/f2fs_fs.h +++

[f2fs-dev] [PATCH 5/5] f2fs: allow to mount if cap is 100

2024-02-23 Thread Jaegeuk Kim
Don't block mounting the partition, if cap is 100%. Signed-off-by: Jaegeuk Kim --- fs/f2fs/segment.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/fs/f2fs/segment.c b/fs/f2fs/segment.c index 6d586ae8b55f..f11361152d2a 100644 --- a/fs/f2fs/segment.c +++ b/fs/f2fs/segment.c @@ -904,6

[f2fs-dev] [PATCH 4/5] f2fs: prevent an f2fs_gc loop during disable_checkpoint

2024-02-23 Thread Jaegeuk Kim
Don't get stuck in the f2fs_gc loop while disabling checkpoint. Instead, we have a time-based management. Signed-off-by: Jaegeuk Kim --- fs/f2fs/super.c | 1 + 1 file changed, 1 insertion(+) diff --git a/fs/f2fs/super.c b/fs/f2fs/super.c index fc7f1a9fbbda..7d9b92978709 100644 ---

[f2fs-dev] [PATCH 2/5] f2fs: fix write pointers all the time

2024-02-23 Thread Jaegeuk Kim
Even if the roll forward recovery stopped due to any error, we have to fix the write pointers in order to mount the disk from the previous checkpoint. Signed-off-by: Jaegeuk Kim --- fs/f2fs/recovery.c | 2 +- fs/f2fs/super.c| 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff

[f2fs-dev] [PATCH 3/5] f2fs: print zone status in string and some log

2024-02-23 Thread Jaegeuk Kim
No functional change, but add some more logs. Signed-off-by: Jaegeuk Kim --- fs/f2fs/segment.c | 34 -- fs/f2fs/super.c | 1 + 2 files changed, 25 insertions(+), 10 deletions(-) diff --git a/fs/f2fs/segment.c b/fs/f2fs/segment.c index

[f2fs-dev] [PATCH 1/5] f2fs: check number of blocks in a current section

2024-02-23 Thread Jaegeuk Kim
In cfd66bb715fd ("f2fs: fix deadloop in foreground GC"), we needed to check the number of blocks in a section instead of the segment. In addtion, let's check the entire node sections when checking the avaiable node block space. It does not match one to one per temperature, but currently we don't

Re: [f2fs-dev] [PATCH] f2fs: fix to use correct segment type in f2fs_allocate_data_block()

2024-02-23 Thread Jaegeuk Kim
On 02/23, Chao Yu wrote: > @type in f2fs_allocate_data_block() indicates log header's type, it > can be CURSEG_COLD_DATA_PINNED or CURSEG_ALL_DATA_ATGC, rather than > type of data/node, however IS_DATASEG()/IS_NODESEG() only accept later > one, fix it. > > Fixes: 093749e296e2 ("f2fs: support age

Re: [f2fs-dev] [FYI][PATCH] tracing/treewide: Remove second parameter of __assign_str()

2024-02-23 Thread Steven Rostedt
On Fri, 23 Feb 2024 13:46:53 -0500 Steven Rostedt wrote: > Now one thing I could do is to not remove the parameter, but just add: > > WARN_ON_ONCE((src) != __data_offsets->item##_ptr_); > > in the __assign_str() macro to make sure that it's still the same that is > assigned. But I'm not

Re: [f2fs-dev] [FYI][PATCH] tracing/treewide: Remove second parameter of __assign_str()

2024-02-23 Thread Kent Overstreet
On Fri, Feb 23, 2024 at 01:46:53PM -0500, Steven Rostedt wrote: > On Fri, 23 Feb 2024 10:30:45 -0800 > Jeff Johnson wrote: > > > On 2/23/2024 9:56 AM, Steven Rostedt wrote: > > > From: "Steven Rostedt (Google)" > > > > > > [ > > >This is a treewide change. I will likely re-create this

Re: [f2fs-dev] [FYI][PATCH] tracing/treewide: Remove second parameter of __assign_str()

2024-02-23 Thread Steven Rostedt
On Fri, 23 Feb 2024 14:50:49 -0500 Kent Overstreet wrote: > Tangentially related though, what would make me really happy is if we > could create the string with in the TP__fast_assign() section. I have to > have a bunch of annoying wrappers right now because the string length > has to be known

Re: [f2fs-dev] [FYI][PATCH] tracing/treewide: Remove second parameter of __assign_str()

2024-02-23 Thread Jeff Johnson
On 2/23/2024 9:56 AM, Steven Rostedt wrote: > From: "Steven Rostedt (Google)" > > [ >This is a treewide change. I will likely re-create this patch again in >the second week of the merge window of v6.9 and submit it then. Hoping >to keep the conflicts that it will cause to a minimum.

Re: [f2fs-dev] [FYI][PATCH] tracing/treewide: Remove second parameter of __assign_str()

2024-02-23 Thread Steven Rostedt
On Fri, 23 Feb 2024 10:30:45 -0800 Jeff Johnson wrote: > On 2/23/2024 9:56 AM, Steven Rostedt wrote: > > From: "Steven Rostedt (Google)" > > > > [ > >This is a treewide change. I will likely re-create this patch again in > >the second week of the merge window of v6.9 and submit it

Re: [f2fs-dev] [PATCH] f2fs: introduce SEGS_TO_BLKS/BLKS_TO_SEGS for cleanup

2024-02-23 Thread Jaegeuk Kim
Chao, I applied the below as well in order to keep zone capacity back. --- a/fs/f2fs/segment.h +++ b/fs/f2fs/segment.h @@ -101,11 +101,10 @@ static inline void sanity_check_seg_type(struct f2fs_sb_info *sbi, NULL_SEGNO : GET_L2R_SEGNO(FREE_I(sbi), \

Re: [f2fs-dev] [FYI][PATCH] tracing/treewide: Remove second parameter of __assign_str()

2024-02-23 Thread Steven Rostedt
On Fri, 23 Feb 2024 12:56:34 -0500 Steven Rostedt wrote: > Note, the same updates will need to be done for: > > __assign_str_len() > __assign_rel_str() > __assign_rel_str_len() Correction: The below macros do not pass in their source to the entry macros, so they will not need to be

Re: [f2fs-dev] [PATCH 3/3 v2] f2fs: kill zone-capacity support

2024-02-23 Thread Jaegeuk Kim
On 02/22, Matias Bjørling wrote: > On 21-02-2024 18:27, Jaegeuk Kim wrote: > > > > Doesn't this break practically all ZNS NVMe devices? > > > > Yes, so here I'm in questioning who is really using w/ zone capacity. If > > there's > > no user complaining, I'd like to deprecate this, since this

Re: [f2fs-dev] [PATCH v3 2/2] f2fs: support file pinning for zoned devices

2024-02-23 Thread Jaegeuk Kim
Hi Chao, I've tested the patch and queued in -dev, so can you take a look at it and propose any change on top of it? Then, we can discuss further on it. On 02/23, Chao Yu wrote: > On 2024/2/14 1:38, Daeho Jeong wrote: > > From: Daeho Jeong > > > > Support file pinning with conventional storage