All of lore.kernel.org
 help / color / mirror / Atom feed
From: Josef Bacik <josef@toxicpanda.com>
To: Christoph Hellwig <hch@infradead.org>
Cc: fstests@vger.kernel.org, linux-btrfs@vger.kernel.org, kernel-team@fb.com
Subject: Re: [PATCH 1/3] fstests: check btrfs profile configs before allowing raid56
Date: Wed, 20 Mar 2024 10:40:19 -0400	[thread overview]
Message-ID: <20240320144019.GB3014929@perftesting> (raw)
In-Reply-To: <Zfn8n5jmpTAdzBkK@infradead.org>

On Tue, Mar 19, 2024 at 01:59:11PM -0700, Christoph Hellwig wrote:
> On Tue, Mar 19, 2024 at 12:55:56PM -0400, Josef Bacik wrote:
> > +++ b/common/btrfs
> > @@ -111,8 +111,12 @@ _require_btrfs_fs_feature()
> >  		_notrun "Feature $feat not supported by the available btrfs version"
> >  
> >  	if [ $feat = "raid56" ]; then
> > -		# Zoned btrfs only supports SINGLE profile
> > -		_require_non_zoned_device "${SCRATCH_DEV}"
> > +		# Make sure it's in our supported configs as well
> > +		_btrfs_get_profile_configs
> > +		if [[ ! "${_btrfs_profile_configs[@]}" =~ "raid5" ]] ||
> > +		   [[ ! "${_btrfs_profile_configs[@]}" =~ "raid6" ]]; then
> > +			_notrun "raid56 excluded from profile configs"
> > +		fi
> 
> Should _require_btrfs_fs_feature check for raid5 and raid6 individually?
> Right now it seems like you need both raid5 and raid6 in the profiles
> to run checks that probably only exercise either?
> 

The tests that use this are testing them both.  I could make them optionally
test one or the other depending on the profile you had set, but I don't think
this is particularly useful.  If you have strong feelings about it I could
alternatively add a helper that is

_require_raid_profile "profile name"

and then add those to the different tests to be more fine grained about it,
since technically this helper is about checking if a specific kernel feature is
available.  Thanks,

Josef

  reply	other threads:[~2024-03-20 14:40 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-03-19 16:55 [PATCH 0/3] fstests: various RAID56 related fixes for btrfs Josef Bacik
2024-03-19 16:55 ` [PATCH 1/3] fstests: check btrfs profile configs before allowing raid56 Josef Bacik
2024-03-19 20:59   ` Christoph Hellwig
2024-03-20 14:40     ` Josef Bacik [this message]
2024-03-21 21:37       ` Christoph Hellwig
2024-03-20 12:31   ` Anand Jain
2024-03-20 14:41     ` Josef Bacik
2024-03-19 16:55 ` [PATCH 2/3] fstests: btrfs/195: skip raid setups not in the profile configs Josef Bacik
2024-03-24 14:25   ` Anand Jain
2024-03-19 16:55 ` [PATCH 3/3] fstests: add _require_btrfs_fs_feature raid56 to a few tests Josef Bacik
2024-03-21  5:55   ` Naohiro Aota
2024-03-24 14:16     ` Anand Jain

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=20240320144019.GB3014929@perftesting \
    --to=josef@toxicpanda.com \
    --cc=fstests@vger.kernel.org \
    --cc=hch@infradead.org \
    --cc=kernel-team@fb.com \
    --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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.