* [PATCH] fsck.f2fs: fix to skip repairing initialized i_gc_failures
@ 2018-11-26 14:19 Chao Yu
2018-11-27 0:04 ` Jaegeuk Kim
0 siblings, 1 reply; 5+ messages in thread
From: Chao Yu @ 2018-11-26 14:19 UTC (permalink / raw)
To: jaegeuk; +Cc: linux-f2fs-devel
From: Chao Yu <yuchao0@huawei.com>
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:
> [FIX] (fsck_chk_inode_blk: 954) --> Regular: 0xXYZ reset i_gc_failures from 0x1 to 0x00
In old kernel, we initialized i_gc_failures as 0x01, let's skip
resetting such unchanged initialized value to avoid unnecessary
repairing.
Reported-by: Michael Laß <bevan@bi-co.net>
Signed-off-by: Chao Yu <yuchao0@huawei.com>
---
fsck/fsck.c | 4 +++-
1 file changed, 3 insertions(+), 1 deletion(-)
diff --git a/fsck/fsck.c b/fsck/fsck.c
index 970d150..db0e72f 100644
--- a/fsck/fsck.c
+++ b/fsck/fsck.c
@@ -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,
--
2.18.0
_______________________________________________
Linux-f2fs-devel mailing list
Linux-f2fs-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/linux-f2fs-devel
^ permalink raw reply related [flat|nested] 5+ messages in thread
* Re: [PATCH] fsck.f2fs: fix to skip repairing initialized i_gc_failures
2018-11-26 14:19 [PATCH] fsck.f2fs: fix to skip repairing initialized i_gc_failures Chao Yu
@ 2018-11-27 0:04 ` Jaegeuk Kim
2018-11-27 3:10 ` Chao Yu
0 siblings, 1 reply; 5+ messages in thread
From: Jaegeuk Kim @ 2018-11-27 0:04 UTC (permalink / raw)
To: Chao Yu; +Cc: linux-f2fs-devel
On 11/26, Chao Yu wrote:
> From: Chao Yu <yuchao0@huawei.com>
>
> 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:
>
> > [FIX] (fsck_chk_inode_blk: 954) --> Regular: 0xXYZ reset i_gc_failures from 0x1 to 0x00
>
> In old kernel, we initialized i_gc_failures as 0x01, let's skip
> resetting such unchanged initialized value to avoid unnecessary
> repairing.
>
> Reported-by: Michael Laß <bevan@bi-co.net>
> Signed-off-by: Chao Yu <yuchao0@huawei.com>
> ---
> fsck/fsck.c | 4 +++-
> 1 file changed, 3 insertions(+), 1 deletion(-)
>
> diff --git a/fsck/fsck.c b/fsck/fsck.c
> index 970d150..db0e72f 100644
> --- a/fsck/fsck.c
> +++ b/fsck/fsck.c
> @@ -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.
>
> DBG(1, "Regular Inode: 0x%x [%s] depth: %d\n\n",
> le32_to_cpu(node_blk->footer.ino), en,
> --
> 2.18.0
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [PATCH] fsck.f2fs: fix to skip repairing initialized i_gc_failures
2018-11-27 0:04 ` Jaegeuk Kim
@ 2018-11-27 3:10 ` Chao Yu
2018-11-27 3:52 ` Jaegeuk Kim
0 siblings, 1 reply; 5+ messages in thread
From: Chao Yu @ 2018-11-27 3:10 UTC (permalink / raw)
To: Jaegeuk Kim, Chao Yu; +Cc: linux-f2fs-devel
On 2018/11/27 8:04, Jaegeuk Kim wrote:
> On 11/26, Chao Yu wrote:
>> From: Chao Yu <yuchao0@huawei.com>
>>
>> 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:
>>
>>> [FIX] (fsck_chk_inode_blk: 954) --> Regular: 0xXYZ reset i_gc_failures from 0x1 to 0x00
>>
>> In old kernel, we initialized i_gc_failures as 0x01, let's skip
>> resetting such unchanged initialized value to avoid unnecessary
>> repairing.
>>
>> Reported-by: Michael Laß <bevan@bi-co.net>
>> Signed-off-by: Chao Yu <yuchao0@huawei.com>
>> ---
>> fsck/fsck.c | 4 +++-
>> 1 file changed, 3 insertions(+), 1 deletion(-)
>>
>> diff --git a/fsck/fsck.c b/fsck/fsck.c
>> index 970d150..db0e72f 100644
>> --- a/fsck/fsck.c
>> +++ b/fsck/fsck.c
>> @@ -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.
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,
>
>>
>> DBG(1, "Regular Inode: 0x%x [%s] depth: %d\n\n",
>> le32_to_cpu(node_blk->footer.ino), en,
>> --
>> 2.18.0
>
> .
>
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [PATCH] fsck.f2fs: fix to skip repairing initialized i_gc_failures
2018-11-27 3:10 ` Chao Yu
@ 2018-11-27 3:52 ` Jaegeuk Kim
2018-11-27 6:07 ` Chao Yu
0 siblings, 1 reply; 5+ messages in thread
From: Jaegeuk Kim @ 2018-11-27 3:52 UTC (permalink / raw)
To: Chao Yu; +Cc: linux-f2fs-devel
On 11/27, Chao Yu wrote:
> On 2018/11/27 8:04, Jaegeuk Kim wrote:
> > On 11/26, Chao Yu wrote:
> >> From: Chao Yu <yuchao0@huawei.com>
> >>
> >> 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:
> >>
> >>> [FIX] (fsck_chk_inode_blk: 954) --> Regular: 0xXYZ reset i_gc_failures from 0x1 to 0x00
> >>
> >> In old kernel, we initialized i_gc_failures as 0x01, let's skip
> >> resetting such unchanged initialized value to avoid unnecessary
> >> repairing.
> >>
> >> Reported-by: Michael Laß <bevan@bi-co.net>
> >> Signed-off-by: Chao Yu <yuchao0@huawei.com>
> >> ---
> >> fsck/fsck.c | 4 +++-
> >> 1 file changed, 3 insertions(+), 1 deletion(-)
> >>
> >> diff --git a/fsck/fsck.c b/fsck/fsck.c
> >> index 970d150..db0e72f 100644
> >> --- a/fsck/fsck.c
> >> +++ b/fsck/fsck.c
> >> @@ -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.
>
> 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?
How about adding another preen mode?
For example,
- 2: same as 0, but skip some checks for old kernel
>
> Thanks,
>
> >
> >>
> >> DBG(1, "Regular Inode: 0x%x [%s] depth: %d\n\n",
> >> le32_to_cpu(node_blk->footer.ino), en,
> >> --
> >> 2.18.0
> >
> > .
> >
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [PATCH] fsck.f2fs: fix to skip repairing initialized i_gc_failures
2018-11-27 3:52 ` Jaegeuk Kim
@ 2018-11-27 6:07 ` Chao Yu
0 siblings, 0 replies; 5+ messages in thread
From: Chao Yu @ 2018-11-27 6:07 UTC (permalink / raw)
To: Jaegeuk Kim; +Cc: linux-f2fs-devel
On 2018/11/27 11:52, Jaegeuk Kim wrote:
> On 11/27, Chao Yu wrote:
>> On 2018/11/27 8:04, Jaegeuk Kim wrote:
>>> On 11/26, Chao Yu wrote:
>>>> From: Chao Yu <yuchao0@huawei.com>
>>>>
>>>> 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:
>>>>
>>>>> [FIX] (fsck_chk_inode_blk: 954) --> Regular: 0xXYZ reset i_gc_failures from 0x1 to 0x00
>>>>
>>>> In old kernel, we initialized i_gc_failures as 0x01, let's skip
>>>> resetting such unchanged initialized value to avoid unnecessary
>>>> repairing.
>>>>
>>>> Reported-by: Michael Laß <bevan@bi-co.net>
>>>> Signed-off-by: Chao Yu <yuchao0@huawei.com>
>>>> ---
>>>> fsck/fsck.c | 4 +++-
>>>> 1 file changed, 3 insertions(+), 1 deletion(-)
>>>>
>>>> diff --git a/fsck/fsck.c b/fsck/fsck.c
>>>> index 970d150..db0e72f 100644
>>>> --- a/fsck/fsck.c
>>>> +++ b/fsck/fsck.c
>>>> @@ -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.
>>
>> 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?
>
> 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,
>
>>
>> Thanks,
>>
>>>
>>>>
>>>> DBG(1, "Regular Inode: 0x%x [%s] depth: %d\n\n",
>>>> le32_to_cpu(node_blk->footer.ino), en,
>>>> --
>>>> 2.18.0
>>>
>>> .
>>>
>
> .
>
^ permalink raw reply [flat|nested] 5+ messages in thread
end of thread, other threads:[~2018-11-27 6:07 UTC | newest]
Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2018-11-26 14:19 [PATCH] fsck.f2fs: fix to skip repairing initialized i_gc_failures Chao Yu
2018-11-27 0:04 ` Jaegeuk Kim
2018-11-27 3:10 ` Chao Yu
2018-11-27 3:52 ` Jaegeuk Kim
2018-11-27 6:07 ` Chao Yu
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.