From: Krystian Kaniewski <krystianmkaniewski@gmail.com>
To: OGAWA Hirofumi <hirofumi@mail.parknet.co.jp>
Cc: linux-kernel@vger.kernel.org, linux-fsdevel@vger.kernel.org,
syzbot+b0aebd03565f5774f7f8@syzkaller.appspotmail.com
Subject: Re: [PATCH v2] fat: skip rename rollback on buffers with failed I/O
Date: Wed, 14 Oct 2026 10:21:44 +0200 [thread overview]
Message-ID: <213005bd-d502-4843-8b04-71fbd8ee2685@gmail.com> (raw)
In-Reply-To: <87bj90m6dq.fsf@mail.parknet.co.jp>
On 10/11/26 20:36, OGAWA Hirofumi wrote:
> Krystian Kaniewski <krystianmkaniewski@gmail.com> writes:
>
> Is this trying to revert as many as possible even if partial? If so, it
> would not help actually, and complex. Maybe we can give up whole if
> partially revert?
>
> Thanks.
Yes, v2 tried to roll back every part that did not share the buffer with
the failed write. I agree that this may only produce a partial rollback
once the rename has progressed past a failed ".." update or old-entry
removal, and the alias tracking makes the error path too complex.
I have reworked this for v3. After either of those failures, the code now
gives up the on-disk rollback entirely, restores only the in-memory state,
reports filesystem corruption through fat_fs_error(), and returns the
original error.
The remaining on-disk recovery is limited to an earlier inode-position
write failure, before any ".." update or old-entry removal. At that point
a complete rollback is still possible by rereading the retained new-entry
buffer or reacquiring the entry buffer through inode writeback. For
RENAME_EXCHANGE, both position restorations are attempted because stopping
after the first failed restoration can leave both names pointing to the
same inode.
Thanks for the suggestion. I have tried to address it in v3 and will send
the revised patch shortly.
--
Krystian Kaniewski
next prev parent reply other threads:[~2026-10-14 8:21 UTC|newest]
Thread overview: 12+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-09-14 16:38 [syzbot] [exfat?] WARNING in vfat_update_dotdot_de syzbot
2026-09-29 9:00 ` [PATCH] fat: validate dotdot buffers in VFAT and MSDOS rename and rollback Krystian Kaniewski
2026-09-30 8:02 ` OGAWA Hirofumi
2026-09-30 12:17 ` Krystian Kaniewski
2026-10-02 13:43 ` [PATCH v2] fat: skip rename rollback on buffers with failed I/O Krystian Kaniewski
2026-10-11 18:36 ` OGAWA Hirofumi
2026-10-14 8:21 ` Krystian Kaniewski [this message]
2026-10-14 8:23 ` [PATCH v3] fat: make rename recovery safe after metadata write errors Krystian Kaniewski
2026-10-15 18:54 ` OGAWA Hirofumi
2026-10-16 13:30 ` Krystian Kaniewski
2026-10-16 13:50 ` OGAWA Hirofumi
2026-10-16 14:01 ` Krystian Kaniewski
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=213005bd-d502-4843-8b04-71fbd8ee2685@gmail.com \
--to=krystianmkaniewski@gmail.com \
--cc=hirofumi@mail.parknet.co.jp \
--cc=linux-fsdevel@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=syzbot+b0aebd03565f5774f7f8@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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®