fsck.f2fs: fix to skip repairing initialized i_gc_failures
PATCH 1/1 fsck.f2fs: fix to skip repairing initialized i_gc_failures
From: Chao Yu <[email protected]>
As Michael reported:
after updating to f2fs-tools 1.12.0, a routine fsck of my file systems took quite a while and output ten-thousands instances of the following line:
Quoted 1 line
[FIX] (
fsck_chk_inode_blk: 954) --> Regular: 0xXYZ reseti_gc_failuresfrom0x1to0x00
In old kernel, we initialized i_gc_failures as 0x01, let's skip resetting such unchanged initialized value to avoid unnecessary repairing.
--- fsck/fsck.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-)
fsck/fsck.c +3 -1
@@ -941,7 +941,9 @@ skip_blkcnt_fix: } i_gc_failures =le16_to_cpu (node_blk->i.i_gc_failures); -if (ftype ==F2FS_FT_REG_FILE && i_gc_failures) { + +/* old kernel initialized i_gc_failures as 0x01, skip repairing */ +if (ftype ==F2FS_FT_REG_FILE && i_gc_failures >1 ) { DBG(1, "Regular Inode: 0x%x [%s] depth: %d\n\n", le32_to_cpu(node_blk->footer.ino), en,
Signature · 8 lines
2.18.0 _______________________________________________ Linux-f2fs-devel mailing list [email protected] https://lists.sourceforge.net/lists/listinfo/linux-f2fs-devel
Quoted 25 lines · Chao Yu
From: Chao Yu <[email protected]>
As Michael reported:
after updating to f2fs-tools 1.12.0, a routine fsck of my file systems took quite a while and output ten-thousands instances of the following line:
Quoted 1 line
[FIX] (
fsck_chk_inode_blk: 954) --> Regular: 0xXYZ reseti_gc_failuresfrom0x1to0x00In old kernel, we initialized
i_gc_failuresas0x01, let's skip resetting such unchanged initialized value to avoid unnecessary repairing.Reported-by Michael Laß <[email protected]>Signed-off-by Chao Yu <[email protected]>--- fsck/fsck.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-)fsck/fsck.c +0
-0
fsck/fsck.c skip_blkcnt_fix: · line 946
Quoted 7 lines
fsck/fsck.c +3
-1@@ -941,7 +941,9 @@ skip_blkcnt_fix: } i_gc_failures =le16_to_cpu (node_blk->i.i_gc_failures); -if (ftype ==F2FS_FT_REG_FILE && i_gc_failures) { + +/* old kernel initialized i_gc_failures as 0x01, skip repairing */ +if (ftype ==F2FS_FT_REG_FILE && i_gc_failures >1 ) {
This will break the current implementation.
Quoted 5 lines
fsck/fsck.c +0
-0DBG(1, "Regular Inode: 0x%x [%s] depth: %d\n\n", le32_to_cpu(node_blk->footer.ino), en,Signature · 1 line
2.18.0
Quoted 28 lines · Jaegeuk Kim
Quoted 27 lines · Chao Yu
From: Chao Yu <[email protected]>
As Michael reported:
after updating to f2fs-tools 1.12.0, a routine fsck of my file systems took quite a while and output ten-thousands instances of the following line:
Quoted 1 line
[FIX] (
fsck_chk_inode_blk: 954) --> Regular: 0xXYZ reseti_gc_failuresfrom0x1to0x00In old kernel, we initialized
i_gc_failuresas0x01, let's skip resetting such unchanged initialized value to avoid unnecessary repairing.Reported-by Michael Laß <[email protected]>Signed-off-by Chao Yu <[email protected]>--- fsck/fsck.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-)fsck/fsck.c +0
-0@@ -941,7 +941,9 @@ skip_blkcnt_fix: }
Quoted 7 lines
fsck/fsck.c skip_blkcnt_fix: · line 946
Quoted 5 lines
fsck/fsck.c +3
-1i_gc_failures =le16_to_cpu (node_blk->i.i_gc_failures); -if (ftype ==F2FS_FT_REG_FILE && i_gc_failures) { + +/* old kernel initialized i_gc_failures as 0x01, skip repairing */ +if (ftype ==F2FS_FT_REG_FILE && i_gc_failures >1 ) {This will break the current implementation.
Yeah, but I doubt that after repairing i_gc_failures, old kernel can still continue creating inodes in where .i_gc_failures equals to 0x01, then fsck will report such info each time..., can we relief fsck in such condition?
Thanks,
Quoted 9 lines
Quoted 6 lines
fsck/fsck.c +0
-0DBG(1, "Regular Inode: 0x%x [%s] depth: %d\n\n", le32_to_cpu(node_blk->footer.ino), en,Signature · 1 line
2.18.0.
Quoted 37 lines · Chao Yu
Quoted 28 lines · Jaegeuk Kim
Quoted 27 lines · Chao Yu
From: Chao Yu <[email protected]>
As Michael reported:
after updating to f2fs-tools 1.12.0, a routine fsck of my file systems took quite a while and output ten-thousands instances of the following line:
Quoted 1 line
[FIX] (
fsck_chk_inode_blk: 954) --> Regular: 0xXYZ reseti_gc_failuresfrom0x1to0x00In old kernel, we initialized
i_gc_failuresas0x01, let's skip resetting such unchanged initialized value to avoid unnecessary repairing.Reported-by Michael Laß <[email protected]>Signed-off-by Chao Yu <[email protected]>--- fsck/fsck.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-)fsck/fsck.c +0
-0@@ -941,7 +941,9 @@ skip_blkcnt_fix: }Quoted 7 lines
fsck/fsck.c skip_blkcnt_fix: · line 946
Quoted 5 lines
fsck/fsck.c +3
-1i_gc_failures =le16_to_cpu (node_blk->i.i_gc_failures); -if (ftype ==F2FS_FT_REG_FILE && i_gc_failures) { + +/* old kernel initialized i_gc_failures as 0x01, skip repairing */ +if (ftype ==F2FS_FT_REG_FILE && i_gc_failures >1 ) {This will break the current implementation.
Quoted 3 lines
Yeah, but I doubt that after repairing
i_gc_failures, old kernel can still continue creating inodes in where .i_gc_failures equals to0x01, then fsck will report such info each time..., can we relief fsck in such condition?
How about adding another preen mode?
For example,
- 2: same as 0, but skip some checks for old kernel
Quoted 12 lines
Thanks,
Quoted 9 lines
Quoted 6 lines
fsck/fsck.c +0
-0DBG(1, "Regular Inode: 0x%x [%s] depth: %d\n\n", le32_to_cpu(node_blk->footer.ino), en,Signature · 1 line
2.18.0.
Quoted 38 lines · Jaegeuk Kim
Quoted 37 lines · Chao Yu
Quoted 35 lines · Jaegeuk Kim
Quoted 25 lines · Chao Yu
From: Chao Yu <[email protected]>
As Michael reported:
after updating to f2fs-tools 1.12.0, a routine fsck of my file systems took quite a while and output ten-thousands instances of the following line:
Quoted 1 line
[FIX] (
fsck_chk_inode_blk: 954) --> Regular: 0xXYZ reseti_gc_failuresfrom0x1to0x00In old kernel, we initialized
i_gc_failuresas0x01, let's skip resetting such unchanged initialized value to avoid unnecessary repairing.Reported-by Michael Laß <[email protected]>Signed-off-by Chao Yu <[email protected]>--- fsck/fsck.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-)fsck/fsck.c +0
-0fsck/fsck.c skip_blkcnt_fix: · line 946
Quoted 7 lines
fsck/fsck.c +3
-1@@ -941,7 +941,9 @@ skip_blkcnt_fix: } i_gc_failures =le16_to_cpu (node_blk->i.i_gc_failures); -if (ftype ==F2FS_FT_REG_FILE && i_gc_failures) { + +/* old kernel initialized i_gc_failures as 0x01, skip repairing */ +if (ftype ==F2FS_FT_REG_FILE && i_gc_failures >1 ) {This will break the current implementation.
Quoted 8 lines
Quoted 3 lines
Yeah, but I doubt that after repairing
i_gc_failures, old kernel can still continue creating inodes in where .i_gc_failures equals to0x01, then fsck will report such info each time..., can we relief fsck in such condition?How about adding another preen mode?
For example,
- 2: same as 0, but skip some checks for old kernel
Good idea, let me change to add this in v2. :)
Thanks,
Quoted 16 lines
Quoted 13 lines
Thanks,
Quoted 9 lines
Quoted 6 lines
fsck/fsck.c +0
-0DBG(1, "Regular Inode: 0x%x [%s] depth: %d\n\n", le32_to_cpu(node_blk->footer.ino), en,Signature · 1 line
2.18.0.
.