From: Johannes Thumshirn <Johannes.Thumshirn@wdc.com>
To: Qu Wenruo <quwenruo.btrfs@gmx.com>, Chris Mason <clm@fb.com>,
Josef Bacik <josef@toxicpanda.com>,
David Sterba <dsterba@suse.com>
Cc: Christoph Hellwig <hch@lst.de>,
Naohiro Aota <Naohiro.Aota@wdc.com>, Qu Wenruo <wqu@suse.com>,
Damien Le Moal <dlemoal@kernel.org>,
"linux-btrfs@vger.kernel.org" <linux-btrfs@vger.kernel.org>,
"linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>
Subject: Re: [PATCH v9 03/11] btrfs: add support for inserting raid stripe extents
Date: Tue, 19 Sep 2023 12:13:32 +0000 [thread overview]
Message-ID: <5452bbcc-64e4-41e0-aab0-162f5a769fd2@wdc.com> (raw)
In-Reply-To: <ca55e159-3ce0-491f-9fc3-fdcbab2bcb05@gmx.com>
On 15.09.23 02:55, Qu Wenruo wrote:
>
> I found a corncer case that this can be problematic.
>
> If we have a fs with RST root tree node/leaf corrupted, mounted with
> rescue=ibadroots, then fs_info->stripe_root would be NULL, and in the
> 5th patch inside set_io_stripe() we just fall back to regular non-RST path.
> This would bring us mostly incorrect data (and can be very problematic
> for nodatacsum files).
>
> Thus stripe_root itself is not a reliable way to determine if we're at
> RST routine, I'd say only super incompat flags is reliable.
Fixed.
>
> And fs_info->stripe_root should only be checked for functions that do
> RST tree operations, and return -EIO properly if it's not initialized.
>> +
>> + if (type != BTRFS_BLOCK_GROUP_DATA)
>> + return false;
>> +
>> + if (profile & BTRFS_BLOCK_GROUP_RAID1_MASK)
>> + return true;
>
> Just a stupid quest, RAID0 DATA doesn't need RST purely because they are
> the same as SINGLE, thus we only update the file items to the real
> written logical address, and no need for the extra mapping?
Yes but there can still be discrepancies between the assumed physical
address and the real one due to ZONE_APPEND operations. RST backed file
systems don't go the "normal" zoned btrfs logical rewrite path but have
their own.
Also I prefere to keep the stripes together.
> Thus only profiles with duplication relies on RST, right?
> If so, then I guess DUP should also be covered by RST.
>
Later in this patches, DUP, RAID0 and RAID10 will get added as well.
next prev parent reply other threads:[~2023-09-19 12:13 UTC|newest]
Thread overview: 29+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-09-14 16:06 [PATCH v9 00/11] btrfs: introduce RAID stripe tree Johannes Thumshirn
2023-09-14 16:06 ` [PATCH v9 01/11] btrfs: add raid stripe tree definitions Johannes Thumshirn
2023-09-15 0:22 ` Qu Wenruo
2023-09-15 0:26 ` Qu Wenruo
2023-09-15 9:55 ` Johannes Thumshirn
2023-09-15 10:33 ` Qu Wenruo
2023-09-15 10:46 ` Johannes Thumshirn
2023-10-02 9:32 ` Johannes Thumshirn
2023-09-14 16:06 ` [PATCH v9 02/11] btrfs: read raid-stripe-tree from disk Johannes Thumshirn
2023-09-14 16:06 ` [PATCH v9 03/11] btrfs: add support for inserting raid stripe extents Johannes Thumshirn
2023-09-14 18:07 ` David Sterba
2023-09-15 10:03 ` Geert Uytterhoeven
2023-09-14 18:10 ` David Sterba
2023-09-15 0:55 ` Qu Wenruo
2023-09-19 12:13 ` Johannes Thumshirn [this message]
2023-09-14 16:06 ` [PATCH v9 04/11] btrfs: delete stripe extent on extent deletion Johannes Thumshirn
2023-09-14 16:07 ` [PATCH v9 05/11] btrfs: lookup physical address from stripe extent Johannes Thumshirn
2023-09-14 17:57 ` David Sterba
2023-09-14 16:07 ` [PATCH v9 06/11] btrfs: implement RST version of scrub Johannes Thumshirn
2023-09-15 0:58 ` Qu Wenruo
2023-09-15 14:11 ` David Sterba
2023-09-14 16:07 ` [PATCH v9 07/11] btrfs: zoned: allow zoned RAID Johannes Thumshirn
2023-09-14 17:59 ` David Sterba
2023-09-14 16:07 ` [PATCH v9 08/11] btrfs: add raid stripe tree pretty printer Johannes Thumshirn
2023-09-14 16:07 ` [PATCH v9 09/11] btrfs: announce presence of raid-stripe-tree in sysfs Johannes Thumshirn
2023-09-14 16:07 ` [PATCH v9 10/11] btrfs: add trace events for RST Johannes Thumshirn
2023-09-14 16:07 ` [PATCH v9 11/11] btrfs: add raid-stripe-tree to features enabled with debug Johannes Thumshirn
2023-09-14 18:25 ` [PATCH v9 00/11] btrfs: introduce RAID stripe tree David Sterba
2023-09-20 16:23 ` David Sterba
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=5452bbcc-64e4-41e0-aab0-162f5a769fd2@wdc.com \
--to=johannes.thumshirn@wdc.com \
--cc=Naohiro.Aota@wdc.com \
--cc=clm@fb.com \
--cc=dlemoal@kernel.org \
--cc=dsterba@suse.com \
--cc=hch@lst.de \
--cc=josef@toxicpanda.com \
--cc=linux-btrfs@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=quwenruo.btrfs@gmx.com \
--cc=wqu@suse.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®