Bug 215709

Summary: kernel deadlocks while mounting the image
Product: File System Reporter: bughunter (yanming)
Component: f2fsAssignee: Default virtual assignee for f2fs (filesystem_f2fs)
Status: RESOLVED CODE_FIX    
Severity: normal CC: chao
Priority: P1    
Hardware: All   
OS: Linux   
Kernel Version: 5.15.4 Tree: Mainline
Regression: No

Description bughunter 2022-03-21 10:54:32 UTC
I have created an image with mkfs.f2fs, and modified some of the metadata of the image. Unfortunately, when I tried to mount the image with a loop device, the kernel deadlocked. I have attempted many ways to stop the mount process, even executed a 'kill' command, but they are failed, only what I can do is to reboot the system. Can anyone tell me why the kernel deadlocked, and how can I fix this problem?

I have upload the image to the Google Drive (https://drive.google.com/file/d/1DBwKP0-MpkD3eHPTluz3KPcxbdZAw06t/view?usp=sharing). Looking forward to getting a reply :)
Comment 1 Chao Yu 2022-03-21 15:26:14 UTC
Hi, thanks for the report.

I've figured out a patch to fix this, could you please verify with it?

https://lore.kernel.org/linux-f2fs-devel/20220321152211.5656-1-chao@kernel.org/T/#u

Thanks,
Comment 2 bughunter 2022-03-22 04:01:50 UTC
Thank you for prompt reply! I have tried this patch, and it seems that the bug has been fixed.
Comment 3 Chao Yu 2022-03-25 22:18:45 UTC
Thanks for the test. ;)