From: Chao Yu via Linux-f2fs-devel <linux-f2fs-devel@lists.sourceforge.net>
To: Zhiguo Niu <niuzhiguo84@gmail.com>
Cc: Jaegeuk Kim <jaegeuk@kernel.org>, linux-f2fs-devel@lists.sourceforge.net
Subject: Re: [f2fs-dev] f2fs node footer data corruption in Android device
Date: Fri, 6 Jun 2025 16:19:05 +0800 [thread overview]
Message-ID: <c59ca0a0-b976-4d94-bd40-4749a038ef79@kernel.org> (raw)
In-Reply-To: <CAHJ8P3JS4iVmepJuOjNmL2k8JBEU7F_Lv9-XD9cGniKp2U5F1Q@mail.gmail.com>
On 6/5/25 18:43, Zhiguo Niu wrote:
> Chao Yu <chao@kernel.org> 于2025年6月5日周四 17:28写道:
>>
>> On 4/27/25 09:49, Zhiguo Niu wrote:
>>> Hi Chao
>>>
>>> Chao Yu <chao@kernel.org> 于2025年4月25日周五 13:30写道:
>>>>
>>>> Zhiguo,
>>>>
>>>> On 4/25/25 13:11, Zhiguo Niu wrote:
>>>>> Hi Chao and Jaegeuk,
>>>>>
>>>>> I encountered a problem with node footer data being corrupted on an
>>>>> Android device.(kernel version 6.6 and android version:15)
>>>>> after I merged the following patches, the problem still exists.
>>>>> https://git.kernel.org/pub/scm/linux/kernel/git/jaegeuk/f2fs-tools.git/commit/?h=dev-test&id=eba08414c585f90760c4312f57dea78ea45cb5cb
>>>>> https://git.kernel.org/pub/scm/linux/kernel/git/jaegeuk/f2fs.git/commit/fs/f2fs?h=dev-test&id=19426c4988aa85298c1b4caf2889d37ec5c80fea
>>>>> https://git.kernel.org/pub/scm/linux/kernel/git/jaegeuk/f2fs.git/commit/fs/f2fs?h=dev-test&id=c2ecba026586cda6c7dc0fe9e6e60e7e9386c3bd
>>>>> and there is no nat_bits in mount option.
>>>>>
>>>>> I am still debugging, and would like to ask do you have any other
>>>>> hints or suggestions?
>>>>> The issue seem to be closely related to adb remount.
>>>>>
>>>>> test steps:
>>>>> ping 127.0.0.1 -n 20 > nul
>>>>> adb.exe -s mydevice wait-for-device
>>>>> adb.exe -s mydevice reboot bootloader
>>>>> fastboot -s mydevice erase userdata
>>>>> fastboot -s mydevice erase cache
>>>>> fastboot -s mydevice reboot
>>>>> ping 127.0.0.1 -n 30 > nul
>>>>> adb.exe -s mydevice wait-for-device
>>>>> adb.exe -s mydevice root
>>>>> adb.exe -s mydevice remount
>>>>
>>>> Any change for mount option? Can you provide mount option before/after
>>>> remount?
>>>>
>>>>> adb.exe -s mydevice shell rm -rf /data/somefile/*
>>>>
>>>> How about enabling all f2fs tracepoints to catch how target node was
>>>> updated?
>>> Thanks for your quick feedback, this is a useful suggestion.
>>> Thanks a lot.
>>
>> Hi Zhiguo,
>>
>> Can this testcase reproduce the bug stably? and any progress on this issue?
> Hi Chao,
> after debug, the reason of the problem is the "case itself"
> Data encrypted is enabled in android platform, so when full erase
> userdata partition ,
> the metadat partition is also needed to erase, otherwise there will
> be probabilistic data decryption issue.
> cause inode metadata messed up.
> this issue will no reproduce after add:
> fastboot -s mydevice erase metadata
> in scripts.
> thanks for your suggentions and focus on.^^
Zhiguo,
Ah, got it, thanks for your explanation.
>> Thanks,
>>
>>>>
>>>> Thanks,
>>>>
>>>>>
>>>>> dmesg:
>>>>> dm-59: userdata partition, dm-7: scratch image partition is for adb remount
>>>>> [ 3.893630] F2FS-fs (dm-59): Using encoding defined by superblock:
>>>>> utf8-12.1.0 with flags 0x0
>>>>> [ 3.930213] F2FS-fs (dm-59): Mounted with checkpoint version = 38485b2d
>>>>> [ 20.584169] F2FS-fs (dm-7): Mounted with checkpoint version = 42130ef
>>>>> [ 38.039122] F2FS-fs (dm-59): inconsistent node block, nid:1426,
>>>>> node_footer[nid:129565021,ino:2756062298,ofs:26782845,cpver:6421703165179826912,blkaddr:3577851147]
>>>>> [ 38.048310] F2FS-fs (dm-59): inconsistent node block, nid:1426,
>>>>> node_footer[nid:129565021,ino:2756062298,ofs:26782845,cpver:6421703165179826912,blkaddr:3577851147]
>>>>> [ 38.051725] F2FS-fs (dm-59): inconsistent node block, nid:1426,
>>>>> node_footer[nid:129565021,ino:2756062298,ofs:26782845,cpver:6421703165179826912,blkaddr:3577851147]
>>>>> thanks
>>>>
>>
_______________________________________________
Linux-f2fs-devel mailing list
Linux-f2fs-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/linux-f2fs-devel
prev parent reply other threads:[~2025-06-06 8:19 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-04-25 5:11 [f2fs-dev] f2fs node footer data corruption in Android device Zhiguo Niu
2025-04-25 5:30 ` Chao Yu via Linux-f2fs-devel
2025-04-27 1:49 ` Zhiguo Niu
2025-06-05 9:28 ` Chao Yu via Linux-f2fs-devel
2025-06-05 10:43 ` Zhiguo Niu
2025-06-06 8:19 ` Chao Yu via Linux-f2fs-devel [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=c59ca0a0-b976-4d94-bd40-4749a038ef79@kernel.org \
--to=linux-f2fs-devel@lists.sourceforge.net \
--cc=chao@kernel.org \
--cc=jaegeuk@kernel.org \
--cc=niuzhiguo84@gmail.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
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.