在 9/5/2025 4:07 PM, Chao Yu 写道:
On 9/4/2025 5:35 PM, Wang Xiaojun wrote:
Hi Chao,
We previously thought that "triggering checkpoint for fsync after falloc
-k" could solve this problem.
But I found that the above method can be invalid in the following
scenarios.
case 1:
writ
5 12:49 PM, 王晓珺 写道:
在 8/28/2025 9:44 AM, Chao Yu 写道:
On 8/26/25 09:48, 王晓珺 wrote:
在 8/25/2025 10:08 AM, Chao Yu 写道:
On 8/20/25 15:54, Wang Xiaojun wrote:
This patch fixes missing space reclamation during the recovery process.
In the following scenarios, F2FS cannot reclaim truncated space.
cas
process, it is difficult to distinguish
between the above two types of falloc.
So in this case of falloc -k we need to trigger a checkpoint for fsync.
Fixes: d624c96fb3249 ("f2fs: add recovery routines for roll-forward")
Signed-off-by: Wang Xiaojun
---
v4: Trigger checkpoint for fsync af
During the recovery process, F2FS will recover file A,
but the 1M-1G space cannot be reclaimed.
Fixes: d624c96fb3249 ("f2fs: add recovery routines for roll-forward")
Signed-off-by: Wang Xiaojun
---
v3: Add a Fixes line.
v2: Apply Chao's suggestion from v1. No logical changes.
v1: Fi
During the recovery process, F2FS will recover file A,
but the 1M-1G space cannot be reclaimed.
Signed-off-by: Wang Xiaojun
---
v2: Apply Chao's suggestion from v1. No logical changes.
v1: Fix missing space reclamation during the recovery process.
---
fs/f2fs/f2fs.h | 1 +
fs/f2fs/recov
cannot be reclaimed.
Signed-off-by: Wang Xiaojun
---
fs/f2fs/f2fs.h | 1 +
fs/f2fs/recovery.c | 15 ++-
2 files changed, 15 insertions(+), 1 deletion(-)
diff --git a/fs/f2fs/f2fs.h b/fs/f2fs/f2fs.h
index 46be7560548c..d37204567b66 100644
--- a/fs/f2fs/f2fs.h
+++ b/fs/f2fs
iput() has already judged the incoming parameter, so there is
no need to repeat the judgment here.
Signed-off-by: Wang Xiaojun
---
fs/f2fs/namei.c | 3 +--
1 file changed, 1 insertion(+), 2 deletions(-)
diff --git a/fs/f2fs/namei.c b/fs/f2fs/namei.c
index 5f213f05556d..b7c9b602bd72 100644
在 2021/10/26 9:47, Chao Yu 写道:
On 2021/10/26 9:38, Wang Xiaojun wrote:
在 2021/10/26 8:29, Chao Yu 写道:
On 2021/10/25 20:09, Wang Xiaojun wrote:
If sbi->cur_cp is 2 and the duplicate_checkpoint function returns
in advance because sbi->cp_backuped is set to true, we cannot set
sbi->cu
在 2021/10/26 8:29, Chao Yu 写道:
On 2021/10/25 20:09, Wang Xiaojun wrote:
If sbi->cur_cp is 2 and the duplicate_checkpoint function returns
in advance because sbi->cp_backuped is set to true, we cannot set
sbi->cur_cp to 1.
Hmmm, in previous implementation, what problem we will encou
If sbi->cur_cp is 2 and the duplicate_checkpoint function returns
in advance because sbi->cp_backuped is set to true, we cannot set
sbi->cur_cp to 1.
Signed-off-by: Wang Xiaojun
---
fsck/fsck.c | 3 ---
fsck/mount.c | 5 ++---
2 files changed, 2 insertions(+), 6 deletions(-)
diff --g
quota inode is corrupted, we need to rebuild it.
Signed-off-by: Wang Xiaojun
Reviewed-by: Chao Yu
---
v2->v3:
-Add error message when reserve new block fails.
v1->v2:
-Update footer.cp_ver based on CP_CRC_RECOVERY_FLAG.
-Add debug message in f2fs_rebuild_qf_inode.
-Add time_
quota inode is corrupted, we need to rebuild it.
Signed-off-by: Wang Xiaojun
---
v1->v2:
-Update footer.cp_ver based on CP_CRC_RECOVERY_FLAG.
-Add debug message in f2fs_rebuild_qf_inode.
-Add time_t parameter to the f2fs_init_qf_inode.
---
fsck/fsck.c| 2 ++
fsck/fsck.h| 1
quota inode is corrupted, we need to rebuild it.
Signed-off-by: Wang Xiaojun
---
fsck/fsck.c| 2 ++
fsck/fsck.h| 1 +
fsck/node.c| 38 ++
include/f2fs_fs.h | 40
mkfs/f2fs_f
When creating a file, we need to set the temperature based on
extension_list. If the empty string is a valid extension_list,
the is_extension_exist will always returns true,
which affects the separation of hot and cold.
Signed-off-by: Wang Xiaojun
---
v1->v2:let the caller do the check on @n
When creating a file, we need to set the temperature based on
extension_list. If the empty string is a valid extension_list,
the is_extension_exist will always returns true,
which affects the separation of hot and cold.
Signed-off-by: Wang Xiaojun
---
fs/f2fs/namei.c | 2 ++
1 file changed, 2
In page_symlink, reserve_new_block applies address for data block,
not for inodes. Therefore, is_inode is set to 0.
Signed-off-by: Wang Xiaojun
---
fsck/dir.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/fsck/dir.c b/fsck/dir.c
index aeb876d..f7491a7 100644
--- a/fsck
ERANGE indicates that the math result is not representative. Here,
ENAMETOOLONG is used to replace ERANGE.
Signed-off-by: Wang Xiaojun
---
fs/f2fs/xattr.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/fs/f2fs/xattr.c b/fs/f2fs/xattr.c
index c8f34decbf8e..eb827c10e970
If the alloc_type of the original curseg is LFS,
when we change_curseg and then do recover curseg,
the alloc_type becomes SSR.
Signed-off-by: Wang Xiaojun
---
fs/f2fs/segment.c | 3 +++
1 file changed, 3 insertions(+)
diff --git a/fs/f2fs/segment.c b/fs/f2fs/segment.c
index c2866561263e
The case where nid is 0 will be checked in f2fs_check_nid_range.
Remove the unused check.
Signed-off-by: Wang Xiaojun
---
fs/f2fs/node.c | 8
1 file changed, 8 deletions(-)
diff --git a/fs/f2fs/node.c b/fs/f2fs/node.c
index cb1b5b61a1da..c61d5b52e29e 100644
--- a/fs/f2fs/node.c
+++ b
A NULL will not be return by __bitmap_ptr here.
Remove the unused check.
Signed-off-by: Wang Xiaojun
---
fs/f2fs/node.c | 3 ---
1 file changed, 3 deletions(-)
diff --git a/fs/f2fs/node.c b/fs/f2fs/node.c
index cb1b5b61a1da..2cf11662f784 100644
--- a/fs/f2fs/node.c
+++ b/fs/f2fs/node.c
Use seg_end_blkaddr instead of "segment0_blkaddr + (segment_count <<
log_blocks_per_seg)".
Signed-off-by: Wang Xiaojun
---
fs/f2fs/super.c | 12
1 file changed, 4 insertions(+), 8 deletions(-)
diff --git a/fs/f2fs/super.c b/fs/f2fs/super.c
index dfa072fa8081..d9e
Meta area is not included in section_count computation.
So the minimum number of total_sections is 1 meanwhile it cannot be
greater than segment_count_main.
The minimum number of meta segments is 8 (SB + 2 (CP + SIT + NAT) + SSA).
Signed-off-by: Wang Xiaojun
---
fs/f2fs/segment.h | 1 +
fs
Use kfree() instead of kvfree() to free variables allocated
by match_strdup(). Because the memory is allocated with kmalloc
inside match_strdup().
Signed-off-by: Wang Xiaojun
---
fs/f2fs/super.c | 36 ++--
1 file changed, 18 insertions(+), 18 deletions(-)
diff
The parameter compr is unused in the f2fs_cluster_blocks function
so we no longer need to pass it as a parameter.
Signed-off-by: Wang Xiaojun
---
fs/f2fs/compress.c | 6 +++---
1 file changed, 3 insertions(+), 3 deletions(-)
diff --git a/fs/f2fs/compress.c b/fs/f2fs/compress.c
index
24 matches
Mail list logo