All of lore.kernel.org
 help / color / mirror / Atom feed
From: Chao Yu via Linux-f2fs-devel <linux-f2fs-devel@lists.sourceforge.net>
To: Dmitry Antipov <dmantipov@yandex.ru>, Jaegeuk Kim <jaegeuk@kernel.org>
Cc: syzbot+803dd716c4310d16ff3a@syzkaller.appspotmail.com,
	linux-f2fs-devel@lists.sourceforge.net
Subject: Re: [f2fs-dev] [PATCH] fs: f2fs: end all corrupted fs writes with -EFSCORRUPTED
Date: Fri, 25 Apr 2025 10:52:19 +0800	[thread overview]
Message-ID: <45b3d1c8-cb94-43ac-a9af-e8389c74fbd5@kernel.org> (raw)
In-Reply-To: <579042fc-d8e6-4ce4-b3d5-72cfb4102d3c@yandex.ru>

On 4/24/25 18:43, Dmitry Antipov wrote:
> On 4/24/25 11:58 AM, Chao Yu wrote:
> 
>> I guess we need to figure out why f2fs_bug_on() will be tiggerred?
>>
>> f2fs_write_end_io()
>> {
>> ...
>>         f2fs_bug_on(sbi, folio->mapping == NODE_MAPPING(sbi) &&
>>                 folio->index != nid_of_node(&folio->page));
> 
> Well, syzkaller is very "creative" in generating weirdly damaged filesystems :-).

Yeah.

> 
> An overall idea of the patch is that an attempt to complete I/O on a filesystem
> which is known to be "broken enough to run fsck" may make the things even worse
> (by making the filesystem even less consistent). So it may be safer just to
> refuse all in-flight write attempts at least.

We will handle IO once there is critical error (tagged w/ CP_ERROR_FLAG), you
can check the detailed behaviors as below:

errors=%s                Specify f2fs behavior on critical errors. This supports modes:
                         "panic", "continue" and "remount-ro", respectively, trigger
                         panic immediately, continue without doing anything, and remount
                         the partition in read-only mode. By default it uses "continue"
                         mode.
                         ====================== =============== =============== ========
                         mode                   continue        remount-ro      panic
                         ====================== =============== =============== ========
                         access ops             normal          normal          N/A
                         syscall errors         -EIO            -EROFS          N/A
                         mount option           rw              ro              N/A
                         pending dir write      keep            keep            N/A
                         pending non-dir write  drop            keep            N/A
                         pending node write     drop            keep            N/A
                         pending meta write     keep            keep            N/A
                         ====================== =============== =============== ========

But for SBI_NEED_FSCK case, if the inconsistency is detected in specific inode, can we just
stop further updates for this inode? Rather than all inodes?

Thanks,

> 
> Dmitry
> 



_______________________________________________
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-25  2:52 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2025-04-23 16:15 [f2fs-dev] [PATCH] fs: f2fs: end all corrupted fs writes with -EFSCORRUPTED Dmitry Antipov
2025-04-24  8:58 ` Chao Yu via Linux-f2fs-devel
2025-04-24 10:43   ` Dmitry Antipov
2025-04-25  2:52     ` Chao Yu via Linux-f2fs-devel [this message]
2025-04-25  2:29 ` Chao Yu via Linux-f2fs-devel
2025-08-11 10:00   ` 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=45b3d1c8-cb94-43ac-a9af-e8389c74fbd5@kernel.org \
    --to=linux-f2fs-devel@lists.sourceforge.net \
    --cc=chao@kernel.org \
    --cc=dmantipov@yandex.ru \
    --cc=jaegeuk@kernel.org \
    --cc=syzbot+803dd716c4310d16ff3a@syzkaller.appspotmail.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.