From: Qu Wenruo <quwenruo.btrfs@gmx.com>
To: Zhang Boyang <zhangboyang.id@gmail.com>, linux-btrfs@vger.kernel.org
Cc: David Sterba <dsterba@suse.com>, Qu Wenruo <wqu@suse.com>,
Filipe Manana <fdmanana@kernel.org>
Subject: Re: [BUG] two raid consistency bugs
Date: Wed, 15 Jul 2026 07:10:50 +0930 [thread overview]
Message-ID: <67cff567-1070-4908-a253-a8907d237734@gmx.com> (raw)
In-Reply-To: <20260714161044.7330-1-zhangboyang.id@gmail.com>
在 2026/7/15 01:40, Zhang Boyang 写道:
> Hello btrfs devs,
>
> I found two raid-related bugs in btrfs. Two test cases are provided.
>
>
> BUG 1. fstests: btrfs/348: test ambiguous generation handling on raid1 profile
>
> This test simulates a ambiguous generation which can be caused by, for
> example, two successive power failures. Please note this is not related
> to degraded mounts or nodatacow.
>
> This bug may affect several raid levels, take raid1 (say disk A and B)
> as an example:
>
> At first power failure during transaction N, metadata trees of
> generation N are written to disk A, but super is not committed. Nothing
> is written to disk B.
>
> At second power failure during a different transaction N,
If it's a different transaction, why it will still have the same transid N?
> nothing is
> written to disk A, but metadata trees and super is committed to disk B.
>
> This creates a ambiguous generation N in two disks. Currently btrfs
> can't detect this, and can lead to severe damages.
next prev parent reply other threads:[~2026-07-14 21:40 UTC|newest]
Thread overview: 14+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-07-14 16:10 [BUG] two raid consistency bugs Zhang Boyang
2026-07-14 16:10 ` [PATCH 1/2] fstests: btrfs/348: test ambiguous generation handling on raid1 profile Zhang Boyang
2026-07-14 16:10 ` [PATCH 2/2] fstests: btrfs/349: test if latest tree-log is choosen at mount time " Zhang Boyang
2026-07-14 21:40 ` Qu Wenruo [this message]
2026-07-15 5:46 ` [BUG] two raid consistency bugs Zhang Boyang
2026-07-15 6:10 ` Qu Wenruo
2026-07-15 7:38 ` Zhang Boyang
2026-07-15 8:36 ` Qu Wenruo
2026-07-15 9:25 ` Zhang Boyang
2026-07-15 9:44 ` Qu Wenruo
2026-07-15 10:07 ` Zhang Boyang
2026-07-15 10:11 ` Qu Wenruo
2026-07-15 10:41 ` Zhang Boyang
2026-07-15 13:11 ` Alan Huang
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=67cff567-1070-4908-a253-a8907d237734@gmx.com \
--to=quwenruo.btrfs@gmx.com \
--cc=dsterba@suse.com \
--cc=fdmanana@kernel.org \
--cc=linux-btrfs@vger.kernel.org \
--cc=wqu@suse.com \
--cc=zhangboyang.id@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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox