From: Qu Wenruo <quwenruo.btrfs@gmx.com>
To: Johannes Thumshirn <Johannes.Thumshirn@wdc.com>,
Johannes Thumshirn <jth@kernel.org>, Chris Mason <clm@fb.com>,
Josef Bacik <josef@toxicpanda.com>,
David Sterba <dsterba@suse.com>
Cc: "linux-btrfs@vger.kernel.org" <linux-btrfs@vger.kernel.org>,
"linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>
Subject: Re: [PATCH v4 3/7] btrfs: split RAID stripes on deletion
Date: Mon, 8 Jul 2024 14:50:07 +0930 [thread overview]
Message-ID: <ecd368a8-2582-4d23-a89d-549abb8c4902@gmx.com> (raw)
In-Reply-To: <e3927e86-d85e-4003-9ce5-e9e88741afa3@wdc.com>
在 2024/7/8 14:26, Johannes Thumshirn 写道:
> On 06.07.24 01:26, Qu Wenruo wrote:
>>
>>
>> 在 2024/7/6 00:43, Johannes Thumshirn 写道:
>>> From: Johannes Thumshirn <johannes.thumshirn@wdc.com>
>>>
>>> The current RAID stripe code assumes, that we will always remove a
>>> whole stripe entry.
>>>
>>> But if we're only removing a part of a RAID stripe we're hitting the
>>> ASSERT()ion checking for this condition.
>>>
>>> Instead of assuming the complete deletion of a RAID stripe, split the
>>> stripe if we need to.
>>
>> Sorry to be so critical, but if I understand correctly,
>> btrfs_insert_one_raid_extent() does not do any merge of stripe extent.
>
> No problem at all. I want to solve bugs, not increase my patch count ;).
>
>>
>> Thus one stripe extent always means part of a data extent.
>>
>> In that case a removal of a data extent should always remove all its
>> stripe extents.
>>
>> Furthermore due to the COW nature on zoned/rst devices, the space of a
>> deleted data extent should not be re-allocated until a transaction
>> commitment.
>>
>> Thus I'm wonder if this split is masking some bigger problems.
>
> Hmm now that you're saying it. The reason I wrote this path is, that I
> did hit the following ASSERT() in my testing:
>
>>> - ASSERT(found_start >= start && found_end <= end);
>
> This indicates a partial delete of a stripe extent. But I agree as
> stripe extents are tied to extent items, this shouldn't really happen.
>
> So maybe most of this series (apart from the deadlock fix) masks problems?
>
> I'm back to the drawing board :(.
Can the ASSERT() be reproduced without a zoned device? (I'm really not a
fan of the existing tcmu emulated solution, meanwhile libvirt still
doesn't support ZNS devices)
If it can be reproduced just with RST feature, I may provide some help
digging into the ASSERT().
Thanks,
Qu
next prev parent reply other threads:[~2024-07-08 5:20 UTC|newest]
Thread overview: 23+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-07-05 15:13 [PATCH v4 0/7] btrfs: rst: updates for RAID stripe tree Johannes Thumshirn
2024-07-05 15:13 ` [PATCH v4 1/7] btrfs: replace stripe extents Johannes Thumshirn
2024-07-05 23:19 ` Qu Wenruo
2024-07-08 11:43 ` Johannes Thumshirn
2024-07-08 22:14 ` Qu Wenruo
2024-07-09 5:49 ` Johannes Thumshirn
2024-07-09 5:36 ` Qu Wenruo
2024-07-05 15:13 ` [PATCH v4 2/7] btrfs: rst: don't print tree dump in case lookup fails Johannes Thumshirn
2024-07-05 23:20 ` Qu Wenruo
2024-07-05 15:13 ` [PATCH v4 3/7] btrfs: split RAID stripes on deletion Johannes Thumshirn
2024-07-05 23:26 ` Qu Wenruo
2024-07-08 4:56 ` Johannes Thumshirn
2024-07-08 5:20 ` Qu Wenruo [this message]
2024-07-08 5:25 ` Johannes Thumshirn
2024-07-08 10:52 ` Johannes Thumshirn
2024-07-08 23:02 ` Qu Wenruo
2024-07-09 5:51 ` Johannes Thumshirn
2024-07-05 15:13 ` [PATCH v4 4/7] btrfs: stripe-tree: add selftests Johannes Thumshirn
2024-07-05 15:13 ` [PATCH v4 5/7] btrfs: don't hold dev_replace rwsem over whole of btrfs_map_block Johannes Thumshirn
2024-07-05 23:28 ` Qu Wenruo
2024-07-05 15:13 ` [PATCH v4 6/7] btrfs: rename brtfs_io_stripe::is_scrub to commit_root Johannes Thumshirn
2024-07-05 23:32 ` Qu Wenruo
2024-07-05 15:13 ` [PATCH v4 7/7] btrfs: stripe-tree: also look at commit root on relocation Johannes Thumshirn
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=ecd368a8-2582-4d23-a89d-549abb8c4902@gmx.com \
--to=quwenruo.btrfs@gmx.com \
--cc=Johannes.Thumshirn@wdc.com \
--cc=clm@fb.com \
--cc=dsterba@suse.com \
--cc=josef@toxicpanda.com \
--cc=jth@kernel.org \
--cc=linux-btrfs@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
/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