From: Dave Chinner <david@fromorbit.com>
To: Wang Xiaoguang <wangxg.fnst@cn.fujitsu.com>
Cc: fstests@vger.kernel.org, linux-btrfs@vger.kernel.org
Subject: Re: [PATCH] generic/175: disable inline data feature for btrfs
Date: Tue, 11 Oct 2016 10:09:38 +1100 [thread overview]
Message-ID: <20161010230938.GG23194@dastard> (raw)
In-Reply-To: <20161010050647.30262-1-wangxg.fnst@cn.fujitsu.com>
On Mon, Oct 10, 2016 at 01:06:47PM +0800, Wang Xiaoguang wrote:
> For btrfs, if compression is enabled, it may generate inline data for a
> blocksize data range, this inline data is stored in fs tree, will not have
> a individual extent, try to reflink this data range at a not-zero offset
> will return EOPNOTSUPP, so here we disable inline data feature for btrfs.
>
> Signed-off-by: Wang Xiaoguang <wangxg.fnst@cn.fujitsu.com>
> ---
> tests/generic/175 | 7 +++++++
> 1 file changed, 7 insertions(+)
>
> diff --git a/tests/generic/175 b/tests/generic/175
> index 964580c..b3f90dc 100755
> --- a/tests/generic/175
> +++ b/tests/generic/175
> @@ -50,6 +50,13 @@ rm -f "$seqres.full"
>
> echo "Format and mount"
> _scratch_mkfs > "$seqres.full" 2>&1
> +# For btrfs, if compression is enabled, it may generate inline data for a
> +# blocksize data range, this inline data is stored in fs tree, will not have
> +# a individual extent, try to reflink this data range at a not-zero offset
> +# will return EOPNOTSUPP, so here we disable inline data feature for btrfs.
> +if [ "$FSTYP" = "btrfs" ]; then
> + export MOUNT_OPTIONS="-o max_inline=0 $MOUNT_OPTIONS"
> +fi
Can we /please stop/ putting special case code like this in tests?
This is an unsustainable and unmaintainable practice - it's making a
mess of the test code. If there are specific mount options that
needs to be avoided, then add an option to filter them out. e.g.
something like this:
_scratch_options_filter btrfs compress
so that it removes any compression option from the btrfs mount/mkfs
that is run for that test.
Cheers,
Dave.
--
Dave Chinner
david@fromorbit.com
next prev parent reply other threads:[~2016-10-10 23:29 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-10-10 5:06 [PATCH] generic/175: disable inline data feature for btrfs Wang Xiaoguang
2016-10-10 9:03 ` Anand Jain
2016-10-10 16:31 ` Darrick J. Wong
2016-10-10 23:09 ` Dave Chinner [this message]
2016-10-11 5:30 ` Wang Xiaoguang
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=20161010230938.GG23194@dastard \
--to=david@fromorbit.com \
--cc=fstests@vger.kernel.org \
--cc=linux-btrfs@vger.kernel.org \
--cc=wangxg.fnst@cn.fujitsu.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