Bug 218770

Summary: fsck seems unable to solve corruption
Product: File System Reporter: Guido (guido.iodice)
Component: f2fsAssignee: Default virtual assignee for f2fs (filesystem_f2fs)
Status: RESOLVED CODE_FIX    
Severity: high CC: guido.iodice, jaegeuk
Priority: P3    
Hardware: All   
OS: Linux   
Kernel Version: Subsystem:
Regression: Yes Bisected commit-id:
Attachments: fsck

Description Guido 2024-04-24 11:40:11 UTC
After installing kernel 6.9rc5 it seems that all my f2fs partitions are corrupted, according to fsck. On boot the check-repair is always performed. I also tried running f2fs from a live usb (with kernel 6.6) but the problem is not solved. Even running fsck several times always finds problems.

I attach the output of fsck -f -d 1 on one of the partitions.
Comment 1 Guido 2024-04-24 11:41:06 UTC
Created attachment 306205 [details]
fsck
Comment 2 Artem S. Tashkinov 2024-04-24 12:19:55 UTC
*** Bug 218769 has been marked as a duplicate of this bug. ***
Comment 3 Artem S. Tashkinov 2024-04-24 12:22:17 UTC
> Even running fsck several times always finds problems.

This looks like a f2fs fsck issue, not the kernel issue.

Please post here:

https://github.com/jaegeuk/f2fs-tools
Comment 4 Artem S. Tashkinov 2024-04-24 12:25:25 UTC
On 4/24/24 12:21 PM, Tor Vic wrote:
> 
> I can confirm the constant fsck issue, and it was fixed in my case by 
> the following patch:
>
>
> https://lore.kernel.org/linux-f2fs-devel/20240409203411.1885121-3-jaegeuk@kernel.org/
Comment 5 Guido 2024-04-24 12:30:47 UTC
(In reply to Artem S. Tashkinov from comment #4)
> On 4/24/24 12:21 PM, Tor Vic wrote:
> > 
> > I can confirm the constant fsck issue, and it was fixed in my case by 
> > the following patch:
> >
> >
> >
> https://lore.kernel.org/linux-f2fs-devel/20240409203411.1885121-3-jaegeuk@kernel.org/

I have 6.9.rc5 (dated 2024-04-21 on kernel.org) Is that patch already applied to it? If yes, it doesn't solve the bug.
Comment 6 Jaegeuk Kim 2024-04-24 17:30:59 UTC
Thank you for the report. It seems I need to reapply that patch indeed.
Comment 7 Guido 2024-04-29 15:58:20 UTC
(In reply to Jaegeuk Kim from comment #6)
> Thank you for the report. It seems I need to reapply that patch indeed.

Does rc6 contain the reapplied patch?
Comment 8 Guido 2024-05-14 11:41:21 UTC
The problem persists in the released version of kernel 6.9
Comment 9 Jaegeuk Kim 2024-05-14 16:32:04 UTC
https://git.kernel.org/pub/scm/linux/kernel/git/jaegeuk/f2fs.git/commit/?h=dev&id=b864ddb57eb00c4ea1e6801c7b2f70f1db2a7f4b

is going to be merged in upcoming weeks and LTS probably will pick up later given the tag.
Comment 10 Guido 2024-05-17 20:02:33 UTC
I applied the patch to 6.9 and it works fine. I am a bit surprised that it is not already applied to 6.9.1.