SBI_NEED_FSCK should be set for fsck has a chance to
repair in case of scan_nat_page fail in run time.
Signed-off-by: Zhiguo Niu
---
fs/f2fs/node.c | 5 -
1 file changed, 4 insertions(+), 1 deletion(-)
diff --git a/fs/f2fs/node.c b/fs/f2fs/node.c
index ee2e1dd..d9e6087 100644
--- a/fs/f2fs
"
PID: 420TASK: ff80f6505880 CPU: 2 COMMAND: "f2fs_gc-259:41"
PID: 393TASK: ff80f6b72c40 CPU: 1 COMMAND: "f2fs_gc-259:40
PID: 513TASK: ff80dd62e740 CPU: 1 COMMAND: "f2fs_gc-254:40"
Signed-off-by: Zhiguo Niu
---
fs/f2fs/checkpoin
Dear Chao,
On Tue, Nov 7, 2023 at 10:53 PM Chao Yu wrote:
>
> On 2023/11/2 9:20, Zhiguo Niu wrote:
> > Because the length of task'name in task_struct can not exceed
> > 16 characters, f2fs some thread'name cannot be fully displayed,
> > including important d
Use f2fs_handle_error to record inconsistent node block error
and return -EFSCORRUPTED instead of -EINVAL.
Signed-off-by: Zhiguo Niu
---
fs/f2fs/node.c | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/fs/f2fs/node.c b/fs/f2fs/node.c
index 248764b..ed963c56 100644
--- a/fs
Dear Chao,
On Mon, Oct 16, 2023 at 3:37 PM Chao Yu wrote:
>
> On 2023/10/13 18:58, Zhiguo Niu wrote:
> > SBI_NEED_FSCK should be set for fsck has a chance to
> > repair in case of scan_nat_page fail in run time.
> >
> > Signed-off-by: Zhiguo Niu
>
> Hi Zh
Dear Chao,
On Mon, Oct 16, 2023 at 5:07 PM Chao Yu wrote:
>
> Zhiguo,
>
> On 2023/10/16 17:02, Zhiguo Niu wrote:
> > Dear Chao,
> >
> > On Mon, Oct 16, 2023 at 3:37 PM Chao Yu wrote:
> >>
> >> On 2023/10/13 18:58, Zhiguo Niu wrote:
> &g
it has no luck to trigger a checkpoint to record SBI_NEED_FSCK
Signed-off-by: Zhiguo Niu
Signed-off-by: Chao Yu
---
changes of v2: Improve the patch according to Chao's suggestions.
---
---
fs/f2fs/node.c | 11 +--
include/linux/f2fs_fs.h | 1 +
2 files changed, 10 insertions
The sending interval of discard and GC should also
consider direct write requests; filesystem is not
idle if there is direct write.
Signed-off-by: Zhiguo Niu
---
fs/f2fs/file.c | 1 +
1 file changed, 1 insertion(+)
diff --git a/fs/f2fs/file.c b/fs/f2fs/file.c
index 5ac53d2627d2..713a2d98728a
get a out-of-bound segment
---
Zhiguo Niu (4):
f2fs: correct counting methods of free_segments in __set_inuse
f2fs: fix panic issue in update_sit_entry
f2fs: enhance judgment conditions of GET_SEGNO
f2fs: stop checkpoint when get a out-of-bounds segment
fs/f2fs/file.c | 7
unexpected problems later.
Signed-off-by: Zhiguo Niu
---
fs/f2fs/file.c| 7 ++-
fs/f2fs/segment.c | 4 +++-
fs/f2fs/segment.h | 3 ++-
3 files changed, 11 insertions(+), 3 deletions(-)
diff --git a/fs/f2fs/file.c b/fs/f2fs/file.c
index 23cd6a1..2cd3cd9 100644
--- a/fs/f2fs/file.c
+++ b/fs
reason: STOP_CP_REASON_OUTOF_RAGNE.
Signed-off-by: Zhiguo Niu
---
fs/f2fs/segment.c | 12 ++--
include/linux/f2fs_fs.h | 1 +
2 files changed, 11 insertions(+), 2 deletions(-)
diff --git a/fs/f2fs/segment.c b/fs/f2fs/segment.c
index 6772ad4..6fe2baf 100644
--- a/fs/f2fs/segment.c
methods like free_sections should be used to
free_segments.
Signed-off-by: Zhiguo Niu
---
fs/f2fs/segment.h | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/fs/f2fs/segment.h b/fs/f2fs/segment.h
index 8129be7..f2847f1 100644
--- a/fs/f2fs/segment.h
+++ b/fs/f2fs/segment
/0xc28
[ 13.508997] do_filp_open+0xbc/0x16c
[ 13.509535] do_sys_openat2+0xa0/0x2a0
So sanity check should be add in update_sit_entry.
Also remove some redundant judgment code.
Signed-off-by: Zhiguo Niu
---
fs/f2fs/segment.c | 5 +++--
1 file changed, 3 insertions(+), 2 deletions(-)
diff --git
reason: STOP_CP_REASON_NO_SEGMENT.
Signed-off-by: Zhiguo Niu
---
changes of v4: use more suitable MACRO name according to Chao's suggestions
changes of v3: correct MACRO spelling and update based on the lastes code
---
---
fs/f2fs/segment.c | 7 ++-
include/linux/f2fs_fs.h | 1 +
2 files
Add a new stop cp reason STOP_CP_REASON_NO_SEGMENT for keeping
consistent with kernel codes.
Signed-off-by: Zhiguo Niu
---
fsck/mount.c | 1 +
include/f2fs_fs.h | 1 +
2 files changed, 2 insertions(+)
diff --git a/fsck/mount.c b/fsck/mount.c
index 50afd01..b983920 100644
--- a/fsck
On Tue, Feb 20, 2024 at 10:36 AM Chao Yu wrote:
>
> On 2024/2/19 22:36, Chao Yu wrote:
> Please think about how to optimize this, which is really ugly now
> ---
> fs/f2fs/checkpoint.c | 12
> 1 file changed, 8 insertions(+), 4 deletions(-)
>
> diff --git
reason: STOP_CP_REASON_OUT_OF_RANGE.
Signed-off-by: Zhiguo Niu
---
changes of v3: correct MACRO spelling and update based on the lastes code
---
---
fs/f2fs/segment.c | 7 ++-
include/linux/f2fs_fs.h | 1 +
2 files changed, 7 insertions(+), 1 deletion(-)
diff --git a/fs/f2fs/segment.c b
Dear Chao
On Mon, Feb 19, 2024 at 11:46 AM Chao Yu wrote:
>
> On 2024/2/6 11:32, Jaegeuk Kim wrote:
> > On 02/05, Chao Yu wrote:
> >> On 2024/2/5 11:30, Zhiguo Niu wrote:
> >>> There are some cases of f2fs_is_valid_blkaddr not handled as
> >>> ERRO
On Tue, Feb 6, 2024 at 11:36 AM Chao Yu wrote:
>
> On 2024/2/6 11:32, Jaegeuk Kim wrote:
> > On 02/05, Chao Yu wrote:
> >> On 2024/2/5 11:30, Zhiguo Niu wrote:
> >>> There are some cases of f2fs_is_valid_blkaddr not handled as
> >>> ERROR_INVALID_
Dear Chao,
thanks for your feedback.
On Fri, Dec 15, 2023 at 10:28 AM Chao Yu wrote:
>
> On 2023/12/12 13:23, Zhiguo Niu wrote:
> > unify the error handling of ERROR_INVALID_BLKADDR in f2fs_is_valid_blkaddr
> > and remove some redundant codes in f2fs_cache_compressed_page.
The current pending_discard attr just only shows the discard_cmd_cnt
information. More discard status can be shown so that we can check
them through sysfs when needed.
Signed-off-by: Zhiguo Niu
---
changes of v2: Improve the patch according to Chao's suggestions.
changes of v3: Add a blank line
The current pending_discard attr just only shows the discard_cmd_cnt
information. More discard status can be shown so that we can check
them through sysfs when needed.
Signed-off-by: Zhiguo Niu
---
changes of v2: Improve the patch according to Chao's suggestions.
changes of v3: Add a blank line
On Tue, Dec 19, 2023 at 1:45 AM Jaegeuk Kim wrote:
>
> On 12/18, Zhiguo Niu wrote:
> > The current pending_discard attr just only shows the discard_cmd_cnt
> > information. More discard status can be shown so that we can check
> > them through sysfs when needed.
> >
On Tue, Dec 19, 2023 at 12:00 PM Chao Yu wrote:
>
> On 2023/12/19 10:21, Zhiguo Niu wrote:
> > The current pending_discard attr just only shows the discard_cmd_cnt
> > information. More discard status can be shown so that we can check
> > them through sysfs when ne
unify the error handling of ERROR_INVALID_BLKADDR in f2fs_is_valid_blkaddr
and remove some redundant codes in f2fs_cache_compressed_page.
Signed-off-by: Zhiguo Niu
---
changes of v2: improve patch according Chao's suggestions.
changes of v3:
-rebase patch to dev-test
-correct
On Tue, Dec 19, 2023 at 11:24 PM Chao Yu wrote:
>
> On 2023/12/19 12:09, Zhiguo Niu wrote:
> > On Tue, Dec 19, 2023 at 12:00 PM Chao Yu wrote:
> >>
> >> On 2023/12/19 10:21, Zhiguo Niu wrote:
> >>> The current pending_discard attr just only shows t
The current pending_discard attr just only shows the discard_cmd_cnt
information. More discard status can be shown so that we can check
them through sysfs when needed.
Signed-off-by: Zhiguo Niu
---
changes of v2: Improve the patch according to Chao's suggestions.
changes of v3: Add a blank line
Dear Chao,
Do you have any other suggestions about this patch version?
thanks!
On Tue, Dec 19, 2023 at 11:57 AM Zhiguo Niu wrote:
>
> unify the error handling of ERROR_INVALID_BLKADDR in f2fs_is_valid_blkaddr
> and remove some redundant codes in f2fs_cache_compressed_page.
>
des, the mainly error -ENOSPC has been handled as bug on,
so other error cases can be proecssed normally without looping.
Fixes: 956fa1ddc132 ("f2fs: fix to check return value of
f2fs_reserve_new_block()")
Signed-off-by: Zhiguo Niu
---
fs/f2fs/recovery.c | 26 --
1 fi
Dear Chao
On Tue, Dec 12, 2023 at 9:32 AM Chao Yu wrote:
>
> On 2023/12/1 13:42, Zhiguo Niu wrote:
> > unify the error handling of f2fs_is_valid_blkaddr and remove some
> > redundant codes in f2fs_cache_compressed_page.
>
> What about moving f2fs_handle_err
epair")
Signed-off-by: Zhiguo Niu
---
changes of v2: move infor print to sutiable position according to Chao's
suggestion.
---
---
fs/f2fs/node.c | 6 +++---
fs/f2fs/xattr.c | 11 +++
2 files changed, 10 insertions(+), 7 deletions(-)
diff --git a/fs/f2fs/node.c b/fs/f2fs/node.c
ind
unify the error handling of ERROR_INVALID_BLKADDR in f2fs_is_valid_blkaddr
and remove some redundant codes in f2fs_cache_compressed_page.
Signed-off-by: Zhiguo Niu
---
changes of v2: improve patch according Chao's suggestions.
---
---
fs/f2fs/checkpoint.c | 43
for IO, f2fs_flush_inline_data will be blocked here,
which will affects the checkpoint process, this is unreasonable.
So IS_INODE should be used in f2fs_flush_inline_data.
Signed-off-by: Zhiguo Niu
---
fs/f2fs/node.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/fs/f2fs/node.c b
Just remove some redundant codes, no logic change.
Signed-off-by: Zhiguo Niu
---
fs/f2fs/compress.c | 4
1 file changed, 4 deletions(-)
diff --git a/fs/f2fs/compress.c b/fs/f2fs/compress.c
index ff26b49..624212d 100644
--- a/fs/f2fs/compress.c
+++ b/fs/f2fs/compress.c
@@ -1889,12 +1889,8
unify the error handling of f2fs_is_valid_blkaddr and remove some
redundant codes in f2fs_cache_compressed_page.
Signed-off-by: Zhiguo Niu
---
fs/f2fs/checkpoint.c | 6 +-
fs/f2fs/compress.c | 8 +++-
fs/f2fs/data.c | 3 ++-
fs/f2fs/extent_cache.c | 7 ---
fs/f2fs
The current pending_discard attr just only shows the discard_cmd_cnt
information, which is not very meaningful. More discard information
can be shown so that we can check them through sysfs when needed.
Signed-off-by: Zhiguo Niu
---
fs/f2fs/sysfs.c | 21 +++--
1 file changed, 15
epair")
Signed-off-by: Zhiguo Niu
---
fs/f2fs/node.c | 6 +++---
fs/f2fs/xattr.c | 12 +++-
2 files changed, 10 insertions(+), 8 deletions(-)
diff --git a/fs/f2fs/node.c b/fs/f2fs/node.c
index e50a093..93bf724 100644
--- a/fs/f2fs/node.c
+++ b/fs/f2fs/node.c
@@ -2754,11 +2754
Dear Chao,
On Tue, Nov 28, 2023 at 10:13 AM Chao Yu wrote:
>
> On 2023/11/24 9:08, Zhiguo Niu wrote:
> > The current pending_discard attr just only shows the discard_cmd_cnt
> > information, which is not very meaningful. More discard information
> > can be shown so that w
The current pending_discard attr just only shows the discard_cmd_cnt
information. More discard status can be shown so that we can check
them through sysfs when needed.
Signed-off-by: Zhiguo Niu
---
changes of v2: Improve the patch according to Chao's suggestions.
---
---
Documentation/ABI
On Thu, Feb 1, 2024 at 6:04 PM Chao Yu wrote:
>
> On 2024/1/31 10:43, Zhiguo Niu wrote:
> > There are some cases of f2fs_is_valid_blkaddr not handled as
> > ERROR_INVALID_BLKADDR,so unify the error handling about all of
> > f2fs_is_valid_blkaddr.
> >
There are some cases of f2fs_is_valid_blkaddr not handled as
ERROR_INVALID_BLKADDR,so unify the error handling about all of
f2fs_is_valid_blkaddr.
Signed-off-by: Zhiguo Niu
---
changes of v6: improve patch according to Chao's suggestions
-restore dump_stack to original position
-adjuest code
Hi Chao
On Mon, Jan 22, 2024 at 11:46 AM Chao Yu wrote:
>
> On 2023/12/25 19:11, Zhiguo Niu wrote:
> > There is a potentail deadloop issue in the corner case of
> > CONFIG_F2FS_FAULT_INJECTION is enabled and the return value
> > of f2fs_reserve_new_block
There are some cases of f2fs_is_valid_blkaddr not handled as
ERROR_INVALID_BLKADDR,so unify the error handling about all of
f2fs_is_valid_blkaddr.
Signed-off-by: Zhiguo Niu
---
changes of v2: improve patch according Chao's suggestions.
changes of v3:
-rebase patch to dev-test
There are some cases of f2fs_is_valid_blkaddr not handled as
ERROR_INVALID_BLKADDR,so unify the error handling about all of
f2fs_is_valid_blkaddr.
Signed-off-by: Zhiguo Niu
---
changes of v2: improve patch according Chao's suggestions.
changes of v3:
-rebase patch to dev-test
-correct return
Hi Jaegeuk,
Thanks for your suggestion,the following is my comment.
On Tue, Jan 30, 2024 at 3:53 AM Jaegeuk Kim wrote:
>
> On 01/23, Zhiguo Niu wrote:
> > There are some cases of f2fs_is_valid_blkaddr not handled as
> > ERROR_INVALID_BLKADDR,so unify the error
On Tue, Jan 30, 2024 at 8:46 AM Zhiguo Niu wrote:
>
> Hi Jaegeuk,
> Thanks for your suggestion,the following is my comment.
>
> On Tue, Jan 30, 2024 at 3:53 AM Jaegeuk Kim wrote:
> >
> > On 01/23, Zhiguo Niu wrote:
> > > There are some cases
> On 2024/1/22 13:46, Zhiguo Niu wrote:
> > Hi Chao
> >
> > On Mon, Jan 22, 2024 at 11:46 AM Chao Yu wrote:
> >>
> >> On 2023/12/25 19:11, Zhiguo Niu wrote:
> >>> There is a potentail deadloop issue in the corner case of
> >>> CONFIG_
There are some cases of f2fs_is_valid_blkaddr not handled as
ERROR_INVALID_BLKADDR,so unify the error handling about all of
f2fs_is_valid_blkaddr.
Signed-off-by: Zhiguo Niu
Signed-off-by: Chao Yu
---
changes of v7: update patch according to sync with Chao
-restore some code to original
On Tue, Feb 6, 2024 at 11:15 AM Jaegeuk Kim wrote:
>
> On 01/29, Zhiguo Niu wrote:
> > A panic issue happened in a reboot test in small capacity device
> > as following:
> > 1.The device size is 64MB, and main area has 24 segments, and
> > CONFIG_F2FS_
unexpected problems later.
Signed-off-by: Zhiguo Niu
---
fs/f2fs/file.c| 7 ++-
fs/f2fs/segment.c | 4 +++-
fs/f2fs/segment.h | 3 ++-
3 files changed, 11 insertions(+), 3 deletions(-)
diff --git a/fs/f2fs/file.c b/fs/f2fs/file.c
index 23cd6a1..2cd3cd9 100644
--- a/fs/f2fs/file.c
+++ b/fs
/0xc28
[ 13.508997] do_filp_open+0xbc/0x16c
[ 13.509535] do_sys_openat2+0xa0/0x2a0
So sanity check should be add in update_sit_entry.
Also remove some redundant judgment code.
Signed-off-by: Zhiguo Niu
---
fs/f2fs/segment.c | 5 +++--
1 file changed, 3 insertions(+), 2 deletions(-)
diff --git
methods like free_sections should be used to
free_segments.
Signed-off-by: Zhiguo Niu
---
fs/f2fs/segment.h | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/fs/f2fs/segment.h b/fs/f2fs/segment.h
index 8129be7..f2847f1 100644
--- a/fs/f2fs/segment.h
+++ b/fs/f2fs/segment
a out-of-bound
segment with segno 24.
3.panic happen in update_sit_entry because access invalid bitmap
pointer.
More detail shown in following three patches.
The three patches are splited here because the modifications are
relatively independent and more readable.
Zhiguo Niu (3):
f2fs: correct
On Tue, Feb 27, 2024 at 9:13 AM Jaegeuk Kim wrote:
>
> On 02/26, Zhiguo Niu wrote:
> > Dear Chao,
> >
> > On Fri, Feb 23, 2024 at 10:38 AM Chao Yu wrote:
> > >
> > > On 2024/2/23 10:01, Zhiguo Niu wrote:
> > > >
> > > >
f2fs_gc_range may return error, so its caller
f2fs_allocate_pinning_section should determine whether
to do retry based on ist return value.
Also just do f2fs_gc_range when f2fs_allocate_new_section
return -EAGAIN, and check cp error case in f2fs_gc_range.
Signed-off-by: Zhiguo Niu
---
fs/f2fs
__allocate_new_segment may return error when get_new_segment
fails, so its caller should check its return value.
Signed-off-by: Zhiguo Niu
---
fs/f2fs/f2fs.h | 2 +-
fs/f2fs/recovery.c | 2 +-
fs/f2fs/segment.c | 7 +--
3 files changed, 7 insertions(+), 4 deletions(-)
diff --git a/fs
new_curseg may return error if get_new_segment fail, so its result
should be check in its caller f2fs_allocate_segment_for_resize,
alos pass this results to free_segment_range.
Signed-off-by: Zhiguo Niu
---
fs/f2fs/f2fs.h| 2 +-
fs/f2fs/gc.c | 7 +--
fs/f2fs/segment.c | 9
Hi Jaegeuk,
Chao's patch fix should can fix this warning:
f2fs: fix to don't call f2fs_stop_checkpoint in spinlock coverage thanks!
-邮件原件-
发件人: Jaegeuk Kim
发送时间: 2024年2月28日 1:38
收件人: Dan Carpenter
抄送: 牛志国 (Zhiguo Niu) ;
linux-f2fs-devel@lists.sourceforge.net
主题: Re: [f2fs-dev] [bug
Hi Jaegeuk,
I understand what you mean^^,
please ignore my last email, sorry again:).
Thanks!
-邮件原件-
发件人: 牛志国 (Zhiguo Niu)
发送时间: 2024年2月28日 8:55
收件人: 'Jaegeuk Kim' ; 'Dan Carpenter'
抄送: 'linux-f2fs-devel@lists.sourceforge.net'
; 金红宇 (Hongyu Jin)
; 'Chao Yu'
主题: 答复: [f2fs-dev] [bug
On Wed, Feb 28, 2024 at 1:18 AM Jaegeuk Kim wrote:
>
> On 02/27, Zhiguo Niu wrote:
> > On Tue, Feb 27, 2024 at 9:13 AM Jaegeuk Kim wrote:
> > >
> > > On 02/26, Zhiguo Niu wrote:
> > > > Dear Chao,
> > > >
> > > > On Fri, Feb 23,
If GET_SEGNO return NULL_SEGNO for some unecpected case,
update_sit_entry will access invalid memory address,
cause system crash. It is better to do sanity check about
GET_SEGNO just like update_segment_mtime & locate_dirty_segment.
Also remove some redundant judgment code.
Signed-off-by: Zh
On Mon, Mar 4, 2024 at 11:19 AM Chao Yu wrote:
>
> On 2024/3/1 19:36, Zhiguo Niu wrote:
> > new_curseg may return error if get_new_segment fail, so its result
> > should be check in its caller f2fs_allocate_segment_for_resize,
> > alos pass this results to free_segment_ran
On Mon, Mar 4, 2024 at 3:17 PM Chao Yu wrote:
>
> On 2024/3/4 11:33, Zhiguo Niu wrote:
> > On Mon, Mar 4, 2024 at 11:19 AM Chao Yu wrote:
> >>
> >> On 2024/3/1 19:36, Zhiguo Niu wrote:
> >>> new_curseg may return error if get_new_segment fail, so its
On Mon, Mar 4, 2024 at 5:19 PM Chao Yu wrote:
>
> On 2024/3/4 15:52, Zhiguo Niu wrote:
> > On Mon, Mar 4, 2024 at 3:17 PM Chao Yu wrote:
> >>
> >> On 2024/3/4 11:33, Zhiguo Niu wrote:
> >>> On Mon, Mar 4, 2024 at 11:19 AM Chao Yu wrote:
> &g
add_bio_entry should not trigger system panic when bio_add_page fail,
fix to remove it.
Fixes: 0b20fcec8651 ("f2fs: cache global IPU bio")
Signed-off-by: Zhiguo Niu
---
fs/f2fs/data.c | 6 --
1 file changed, 4 insertions(+), 2 deletions(-)
diff --git a/fs/f2fs/data.c b/fs/f2fs/da
ve case, please help
consider this patch or
any comment/suggestions about this?
thanks!
On Mon, Feb 26, 2024 at 9:22 AM 牛志国 (Zhiguo Niu) wrote:
>
>
> Hi Jaegeuk
>
> Sorry for disturbing you, Do you have any comments about this patch from
> Chao, I’ve met this issue several tim
6fc
and I tested Chao's patch can avoid the above case, please help
consider this patch or
any comment/suggestions about this?
thanks!
On Tue, Mar 5, 2024 at 9:56 AM Zhiguo Niu wrote:
>
> Dear Jaegeuk,
>
> Let me describe the problem process, it is reproduced by monkey stability
error correctly in its caller.
> >
> > Signed-off-by: Chao Yu
Tested-by: Zhiguo Niu
Thanks!
> > ---
> > fs/f2fs/data.c| 7 +--
> > fs/f2fs/f2fs.h| 2 +-
> > fs/f2fs/file.c| 7 ++-
> > fs/f2fs/gc.c | 7 ++-
> >
-ker...@vger.kernel.org; 牛志国
(Zhiguo Niu)
主题: Re: [PATCH v3] f2fs: reduce expensive checkpoint trigger frequency
注意: 这封邮件来自于外部。除非你确定邮件内容安全,否则不要点击任何链接和附件。
CAUTION: This email originated from outside of the organization. Do not click
links or open attachments unless you recognize the sender
Dear Chao,
On Fri, Feb 23, 2024 at 10:38 AM Chao Yu wrote:
>
> On 2024/2/23 10:01, Zhiguo Niu wrote:
> >
> >
> > On Thu, Feb 22, 2024 at 8:30 PM Chao Yu > <mailto:c...@kernel.org>> wrote:
> >
> > On 2024/2/7 10:01, Zhiguo Niu wrote:
&g
There are some cases of f2fs_is_valid_blkaddr not handled as
ERROR_INVALID_BLKADDR,so unify the error handling about all of
f2fs_is_valid_blkaddr.
Do f2fs_handle_error in __f2fs_is_valid_blkaddr for cleanup.
Signed-off-by: Zhiguo Niu
Signed-off-by: Chao Yu
---
v8: do reboot/monkey stability
{new,change}_curseg() may return error in some special cases,
error handling should be did in their callers, and this will also
facilitate subsequent error path expansion in {new,change}_curseg().
Signed-off-by: Zhiguo Niu
Signed-off-by: Chao Yu
---
fs/f2fs/extent_cache.c | 2 +-
fs/f2fs
add_bio_entry should not trigger system panic when bio_add_page fail,
fix to remove it.
Fixes: 0b20fcec8651 ("f2fs: cache global IPU bio")
Signed-off-by: Zhiguo Niu
---
fs/f2fs/data.c | 6 --
1 file changed, 4 insertions(+), 2 deletions(-)
diff --git a/fs/f2fs/data.c b/fs/f2fs/da
{new,change}_curseg() may return error in some special cases,
error handling should be did in their callers, and this will also
facilitate subsequent error path expansion in {new,change}_curseg().
Signed-off-by: Zhiguo Niu
Signed-off-by: Chao Yu
---
v2: remove the part that are irrelevant
On Mon, Mar 11, 2024 at 2:09 PM Chao Yu wrote:
>
> On 2024/3/8 18:12, Zhiguo Niu wrote:
> > {new,change}_curseg() may return error in some special cases,
> > error handling should be did in their callers, and this will also
> > facilitate subsequent error path expansio
On Mon, Mar 11, 2024 at 11:54 AM Chao Yu wrote:
>
> On 2024/3/8 18:12, Zhiguo Niu wrote:
> > add_bio_entry should not trigger system panic when bio_add_page fail,
> > fix to remove it.
> >
> > Fixes: 0b20fcec8651 ("f2fs: cache global IPU bio")
> > Si
some user behaviors requested filesystem operations, which
will cause filesystem not idle.
Meanwhile adjust f2fs_update_time(REQ_TIME) of
f2fs_ioc_defragment to successful case.
Signed-off-by: Zhiguo Niu
---
fs/f2fs/file.c | 9 -
1 file changed, 8 insertions(+), 1 deletion(-)
diff
A length that exceeds the real size of the inode may be
specified from user, although these out-of-range areas
are not mapped, but they still need to be check in
while loop, which is unnecessary.
Signed-off-by: Zhiguo Niu
---
fs/f2fs/file.c | 4 +++-
1 file changed, 3 insertions(+), 1 deletion
some user behaviors requested filesystem operations, which
will cause filesystem not idle.
Meanwhile adjust some f2fs_update_time(REQ_TIME) positions.
Signed-off-by: Zhiguo Niu
---
v2: update patch according to Chao's suggestions
---
---
fs/f2fs/file.c | 13 ++---
1 file changed, 10
On Thu, Mar 14, 2024 at 9:06 PM Chao Yu wrote:
>
> On 2024/3/13 12:11, Zhiguo Niu wrote:
> > some user behaviors requested filesystem operations, which
> > will cause filesystem not idle.
> > Meanwhile adjust f2fs_update_time(REQ_TIME) of
> > f2fs_ioc_defragment to s
On Fri, Mar 15, 2024 at 11:07 AM Chao Yu wrote:
>
> On 2024/3/15 9:46, Zhiguo Niu wrote:
> > On Thu, Mar 14, 2024 at 9:06 PM Chao Yu wrote:
> >>
> >> On 2024/3/13 12:11, Zhiguo Niu wrote:
> >>> some user behaviors requested filesystem operations,
some user behaviors requested filesystem operations, which
will cause filesystem not idle.
Meanwhile adjust some f2fs_update_time(REQ_TIME) positions.
Signed-off-by: Zhiguo Niu
---
v3: modify some update conditions according to Chao's suggeestions
v2: update patch according to Chao's suggestions
A length that exceeds the real size of the inode may be
specified from user, although these out-of-range areas
are not mapped, but they still need to be check in
while loop, which is unnecessary.
Signed-off-by: Zhiguo Niu
---
v2: check i_size within inode lock according to Chao's suggestions
On Tue, Mar 26, 2024 at 7:11 PM Chao Yu wrote:
>
> On 2024/3/25 13:56, Zhiguo Niu wrote:
> > A length that exceeds the real size of the inode may be
> > specified from user, although these out-of-range areas
> > are not mapped, but they still need to be check
Some comments are confused and just correct with block size is 4KB.
Signed-off-by: Zhiguo Niu
---
include/linux/f2fs_fs.h | 5 +++--
1 file changed, 3 insertions(+), 2 deletions(-)
diff --git a/include/linux/f2fs_fs.h b/include/linux/f2fs_fs.h
index a357287..4a56d18 100644
--- a/include/linux
On Sun, Apr 7, 2024 at 3:29 PM Chao Yu wrote:
>
> On 2024/4/7 10:11, Zhiguo Niu wrote:
> > On Wed, Apr 3, 2024 at 10:26 PM Chao Yu wrote:
> >>
> >> compress and pinfile flag should be checked after inode lock held to
> >> avoid race condition, fix i
On Wed, Apr 3, 2024 at 10:26 PM Chao Yu wrote:
>
> compress and pinfile flag should be checked after inode lock held to
> avoid race condition, fix it.
>
> Fixes: 4c8ff7095bef ("f2fs: support data compression")
> Fixes: 5fed0be8583f ("f2fs: do not allow partial truncation on pinned file")
>
A length that exceeds the real size of the inode may be
specified from user, although these out-of-range areas
are not mapped, but they still need to be check in
while loop, which is unnecessary.
Signed-off-by: Zhiguo Niu
---
v3: adjust code positions according to Chao's suggestions
v2: check
Hi Jaegeuk
Any comments about this patch?
thanks!
On Wed, Mar 20, 2024 at 5:33 PM Chao Yu wrote:
>
> On 2024/3/20 14:22, Zhiguo Niu wrote:
> > some user behaviors requested filesystem operations, which
> > will cause filesystem not idle.
> > Meanwhile adjust some f
On Tue, Apr 16, 2024 at 3:22 PM Chao Yu wrote:
>
> After commit d7e9a9037de2 ("f2fs: Support Block Size == Page Size"),
> F2FS_BLKSIZE equals to PAGE_SIZE, remove unnecessary check condition.
>
> Signed-off-by: Chao Yu
> ---
> fs/f2fs/super.c | 6 --
> 1 file changed, 6 deletions(-)
>
>
Dear Chao,
On Fri, Apr 26, 2024 at 6:37 PM Chao Yu wrote:
>
> Otherwise, it breaks pinfile's sematics.
>
> Cc: Daeho Jeong
> Signed-off-by: Chao Yu
> ---
> fs/f2fs/data.c | 3 ++-
> 1 file changed, 2 insertions(+), 1 deletion(-)
>
> diff --git a/fs/f2fs/data.c b/fs/f2fs/data.c
> index
Fixed!
On Fri, Apr 26, 2024 at 5:37 PM Chao Yu wrote:
>
> On 2024/4/16 19:12, Zhiguo Niu wrote:
> > On Tue, Apr 16, 2024 at 3:22 PM Chao Yu wrote:
> >>
> >> After commit d7e9a9037de2 ("f2fs: Support Block Size == Page Size"),
> >> F2FS_BLKS
After commit d7e9a9037de2 ("f2fs: Support Block Size == Page Size"),
Some comments are confused and just correct with block size is 4KB.
Signed-off-by: Zhiguo Niu
---
v2: add comments "support 64 TB disk size for 16K page size"
---
---
include/linux/f2fs_fs.h | 10 +++--
k even the above conditions met.
It is better to enable atgc dynamiclly when user change atgc_age_threshold
meanwhile this vale is less than elapsed_time and ATGC mount option is on.
Signed-off-by: Zhiguo Niu
---
fs/f2fs/f2fs.h| 1 +
fs/f2fs/segment.c | 9 -
fs/f2fs/sysfs.c
commit 245930617c9b ("f2fs: fix to handle error paths of {new,change}_curseg()")
missed this allocated path, fix it.
Signed-off-by: Zhiguo Niu
---
fs/f2fs/segment.c | 4 +++-
1 file changed, 3 insertions(+), 1 deletion(-)
diff --git a/fs/f2fs/segment.c b/fs/f2fs/segment.c
ind
On Tue, May 21, 2024 at 3:52 AM Jaegeuk Kim wrote:
>
> On 05/17, Zhiguo Niu wrote:
> > commit 245930617c9b ("f2fs: fix to handle error paths of
> > {new,change}_curseg()")
> > missed this allocated path, fix it.
> >
> > Signed-off-by: Zhiguo Niu
557056 3681809 3681809 1
A new FI flag FI_DEFRAG_IN_PROGRESS is introduced to avoid
this scenarios.
Signed-off-by: Zhiguo Niu
---
fs/f2fs/f2fs.h| 1 +
fs/f2fs/file.c| 2 ++
fs/f2fs/segment.c | 3 ++-
3 files changed, 5 insertions(+), 1 deletion(-)
diff --git a/fs/f2fs
557056 3681809 3681809 1
Signed-off-by: Zhiguo Niu
---
v2: check FI_OPU_WRITE without adding new FI flag.
---
---
fs/f2fs/segment.c | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/fs/f2fs/segment.c b/fs/f2fs/segment.c
index 7caf20a..f0c0906 100644
--- a/fs
On Mon, May 27, 2024 at 12:07 PM Zhiguo Niu wrote:
>
> On Mon, May 27, 2024 at 11:49 AM Chao Yu wrote:
> >
> > On 2024/5/20 19:36, Zhiguo Niu wrote:
> > > Now atgc can be enabled based on the following conditions:
> > > -ATGC mount option is
99 matches
Mail list logo