From: Naohiro Aota <Naohiro.Aota@wdc.com>
To: "dsterba@suse.cz" <dsterba@suse.cz>,
Johannes Thumshirn <Johannes.Thumshirn@wdc.com>
Cc: "linux-btrfs@vger.kernel.org" <linux-btrfs@vger.kernel.org>
Subject: Re: [PATCH 3/3] btrfs-progs: tests: add new mkfs test for zoned device
Date: Wed, 3 Sep 2025 07:45:40 +0000 [thread overview]
Message-ID: <DCIZY33HXU8F.21VMNI2HL600I@wdc.com> (raw)
In-Reply-To: <20250902185757.GJ5333@twin.jikos.cz>
On Wed Sep 3, 2025 at 3:57 AM JST, David Sterba wrote:
> On Tue, Sep 02, 2025 at 09:59:20AM +0000, Johannes Thumshirn wrote:
>> On 9/2/25 6:30 AM, Naohiro Aota wrote:
>> > +if [ -f "/sys/fs/btrfs/features/raid_stripe_tree" ]; then
>> > + test_mkfs_single -d dup -m single
>> > + test_mkfs_single -d dup -m dup
>> > +
>> > + test_mkfs_multi -d raid0 -m raid0
>> > + test_mkfs_multi -d raid1 -m raid1
>> > + test_mkfs_multi -d raid10 -m raid10
>> > + # RAID5/6 are not yet supported.
>> > + # test_mkfs_multi -d raid5 -m raid5
>> > + # test_mkfs_multi -d raid6 -m raid6
>> > + test_mkfs_multi -d dup -m dup
>> > +
>> > + if [ -f "/sys/fs/btrfs/features/raid1c34" ]; then
>> > + test_mkfs_multi -d raid1c3 -m raid1c3
>> > + test_mkfs_multi -d raid1c4 -m raid1c4
>> > + else
>> > + _log "skip mount test, missing support for raid1c34"
>> > + test_do_mkfs -d raid1c3 -m raid1c3 ${nullb_devs[@]}
>> > + test_do_mkfs -d raid1c4 -m raid1c4 ${nullb_devs[@]}
>> > + fi
>> > +
>> > + # Non-standard profile/device combinations
>> > +
>> > + # Single device raid0, two device raid10 (simple mount works on older kernels too)
>> > + test_do_mkfs -d raid0 -m raid0 "$dev1"
>> > + test_get_info
>> > + test_do_mkfs -d raid10 -m raid10 "${nullb_devs[1]}" "${nullb_devs[2]}"
>> > + test_get_info
>> > +fi
>> Wouldn't this need to check if mkfs.btrfs supports "-O raid-stripe-tree"
>> as well?
>
> The assumption of the environment is that kernel may not support all
> features so there are the sysfs checks. For progs this assumes that it's
> either a git version or the the testsuite version matches the installed
> progs version.
>
> We could possibly encode the assumptions simlar to what check_prereq()
> does but for version-dependent features. I'm not sure if it's worth, so
> far nobody else complained but it does make sense to make it more
> robust.
I remembered that raid-stripe-tree is still only available with the
EXPERIMENTAL config. I'll add "_test_config EXPERIMENTAL" for this part.
prev parent reply other threads:[~2025-09-03 7:45 UTC|newest]
Thread overview: 12+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-09-02 4:29 [PATCH 0/3] btrfs-progs: tests: add new mkfs test for zoned device Naohiro Aota
2025-09-02 4:29 ` [PATCH 1/3] btrfs-progs: tests: check nullb index for the error case Naohiro Aota
2025-09-02 9:11 ` Qu Wenruo
2025-09-03 7:56 ` Naohiro Aota
2025-09-02 4:29 ` [PATCH 2/3] btrfs-progs: tests: add {,cond_}wait_for_nullbdevs Naohiro Aota
2025-09-02 9:15 ` Qu Wenruo
2025-09-03 7:42 ` Naohiro Aota
2025-09-02 4:29 ` [PATCH 3/3] btrfs-progs: tests: add new mkfs test for zoned device Naohiro Aota
2025-09-02 9:22 ` Qu Wenruo
2025-09-02 9:59 ` Johannes Thumshirn
2025-09-02 18:57 ` David Sterba
2025-09-03 7:45 ` Naohiro Aota [this message]
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=DCIZY33HXU8F.21VMNI2HL600I@wdc.com \
--to=naohiro.aota@wdc.com \
--cc=Johannes.Thumshirn@wdc.com \
--cc=dsterba@suse.cz \
--cc=linux-btrfs@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