All of lore.kernel.org
 help / color / mirror / Atom feed
From: Chao Yu via Linux-f2fs-devel <linux-f2fs-devel@lists.sourceforge.net>
To: Juhyung Park <qkrwngud825@gmail.com>
Cc: uplinkr@airmail.cc, Jaegeuk Kim <jaegeuk@kernel.org>,
	linux-f2fs-devel@lists.sourceforge.net
Subject: Re: [f2fs-dev] Resize metadata corruption
Date: Fri, 11 Apr 2025 15:05:17 +0800	[thread overview]
Message-ID: <99dee2ef-d325-47bd-ae6e-c2af15fa6121@kernel.org> (raw)
In-Reply-To: <CAD14+f06qKLefutNfLFRC4ZbJ2wcn0r1TL3Qx95B14u-XokyZQ@mail.gmail.com>

On 2025/4/11 13:26, Juhyung Park wrote:
> Hi Chao.
> 
> Good news!
> 
> It appears that by some miracle, @uplinkr managed to dodge all odds:
> 1. gparted did not perform shrink as they didn't write the fool-proof
> shrink size calculation code yet
> 2. The new location within the partition table did not overlap with
> the old partition
> 3. The faulty fsck run did not touch the old partition's area
> 
> We managed to get the older partition's location via testdisk (which
> looks for f2fs magic code) and restore the entire partition.

Juhyung,

Great! That's really good news.

I'm too focused on the bug/repair to miss that point, anyway that's really
good point to try to restore data by checking and reading from original
location.

> 
> I insisted that he use this opportunity to reproduce the issue in a
> safe fashion, communicate with upstream and make sure no one else has
> to go through the same thing (after a full backup, obviously).

Thanks, it's really important for us and other uses.

I'm planning to post revert patch for -i support today, and also I'm thinking
about adding a -f option to allow distros user to forcing running resize, w/o
-f option, let it only print caution message of the risk.

> 
> I'll walk him through setting up a dm-snapshot and gather the
> initial/proper resize, mount, fsck log after the backup.
> 
> One thing to note here is that he said that the utilization was very
> full: only 8G left. Maybe this is the corner case that we need to look
> out for?

Thanks for the hint, let me create testcases based on such condition to
see whether it can trigger the bug.

Thanks,

> 
> Thanks,
> 
> On Thu, Apr 10, 2025 at 12:17 AM Chao Yu <chao@kernel.org> wrote:
>>
>> On 4/10/25 14:19, uplinkr@airmail.cc wrote:
>>> On 2025-04-10 08:52, Chao Yu wrote:
>>>> I checked the log, I guess it actually seems pretty bad... I guess we
>>>> need to find out those file which has not been migrated correctly, and
>>>> try to correct them, may be w/ a new tool.
>>>
>>> Hello,
>>>
>>> The issue is the corrupt partition in question contains a lot of unbackupped, valuable data for me. I wasn't aware or informed of the potential issues resizing on F2FS has (the ArchWiki listed none)
>>> and as such recovery of this partition is a lifeline for me.
>>
>> Sorry about this, we should give a explicit caution about resize tool
>> use.
>>
>> But still I didn't get why we can run into this situation, since as you
>> said, resize went through successfully. Could you please provide more
>> details about process of resize? Parameters for resize? Logs you kept
>> during resize? etc.
>>
>>>
>>> Could you please write this tool or a patch that I can try in fsck?
>>
>> I will try my best.
>>
>>>
>>> Thanks.
>>



_______________________________________________
Linux-f2fs-devel mailing list
Linux-f2fs-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/linux-f2fs-devel

  reply	other threads:[~2025-04-11  7:05 UTC|newest]

Thread overview: 18+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2025-04-06  8:04 [f2fs-dev] Resize metadata corruption uplinkr--- via Linux-f2fs-devel
2025-04-06  8:30 ` Juhyung Park
2025-04-08  5:33   ` uplinkr--- via Linux-f2fs-devel
2025-04-10  5:52   ` Chao Yu via Linux-f2fs-devel
2025-04-10  5:57     ` Juhyung Park
2025-04-10  7:00       ` Chao Yu via Linux-f2fs-devel
2025-04-10  7:08         ` Juhyung Park
2025-04-10  7:34           ` Chao Yu via Linux-f2fs-devel
2025-04-10  6:19     ` uplinkr--- via Linux-f2fs-devel
2025-04-10  7:17       ` Chao Yu via Linux-f2fs-devel
2025-04-10  7:31         ` uplinkr--- via Linux-f2fs-devel
2025-04-11  5:26         ` Juhyung Park
2025-04-11  7:05           ` Chao Yu via Linux-f2fs-devel [this message]
2025-04-11 15:49             ` uplinkr--- via Linux-f2fs-devel
2025-04-14  2:51               ` Chao Yu via Linux-f2fs-devel
2025-04-08  5:43 ` Chao Yu via Linux-f2fs-devel
2025-04-08  6:10   ` uplinkr--- via Linux-f2fs-devel
2025-04-08  6:18     ` Chao Yu via Linux-f2fs-devel

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=99dee2ef-d325-47bd-ae6e-c2af15fa6121@kernel.org \
    --to=linux-f2fs-devel@lists.sourceforge.net \
    --cc=chao@kernel.org \
    --cc=jaegeuk@kernel.org \
    --cc=qkrwngud825@gmail.com \
    --cc=uplinkr@airmail.cc \
    /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.