public inbox for fstests@vger.kernel.org
 help / color / mirror / Atom feed
From: "Darrick J. Wong" <djwong@kernel.org>
To: Chandan Babu R <chandanrlinux@gmail.com>
Cc: fstests@vger.kernel.org, guaneryu@gmail.com, linux-xfs@vger.kernel.org
Subject: Re: [PATCH 3/3] xfs/530: Bail out if either of reflink or rmapbt is enabled
Date: Mon, 26 Jul 2021 10:19:16 -0700	[thread overview]
Message-ID: <20210726171916.GV559212@magnolia> (raw)
In-Reply-To: <20210726064313.19153-3-chandanrlinux@gmail.com>

On Mon, Jul 26, 2021 at 12:13:13PM +0530, Chandan Babu R wrote:
> _scratch_do_mkfs constructs a mkfs command line by concatenating the values of
> 1. $mkfs_cmd
> 2. $MKFS_OPTIONS
> 3. $extra_mkfs_options
> 
> The corresponding mkfs command line fails if $MKFS_OPTIONS enables either
> reflink or rmapbt feature. The failure occurs because the test tries to create
> a filesystem with realtime device enabled. In such a case, _scratch_do_mkfs()
> will construct and invoke an mkfs command line without including the value of
> $MKFS_OPTIONS.
> 
> To prevent such silent failures, this commit causes the test to exit if it
> detects either reflink or rmapbt feature being enabled.

Er, what combinations of mkfs.xfs and MKFS_OPTIONS cause this result?
What kind of fs configuration comes out of that?

Eventually, the plan is to support rmap[1] and reflink[2] on the
realtime device, at which point this will have to be torn out and a
better solution found.

--D

[1] https://git.kernel.org/pub/scm/linux/kernel/git/djwong/xfs-linux.git/log/?h=realtime-rmap
[2] https://git.kernel.org/pub/scm/linux/kernel/git/djwong/xfs-linux.git/log/?h=realtime-reflink

> Signed-off-by: Chandan Babu R <chandanrlinux@gmail.com>
> ---
>  tests/xfs/530 | 6 ++++++
>  1 file changed, 6 insertions(+)
> 
> diff --git a/tests/xfs/530 b/tests/xfs/530
> index 16dc426c..669b061d 100755
> --- a/tests/xfs/530
> +++ b/tests/xfs/530
> @@ -39,6 +39,12 @@ _require_scratch_nocheck
>  echo "* Test extending rt inodes"
>  
>  _scratch_mkfs | _filter_mkfs >> $seqres.full 2> $tmp.mkfs
> +
> +_xfs_is_reflink_enabled $SCRATCH_DEV && \
> +	_notrun "Realtime device cannot be used when reflink feature is enabled"
> +_xfs_is_rmapbt_enabled $SCRATCH_DEV && \
> +	_notrun "Realtime device cannot be used when rmapbt feature is enabled"
> +
>  . $tmp.mkfs
>  
>  echo "Create fake rt volume"
> -- 
> 2.30.2
> 

  reply	other threads:[~2021-07-26 17:19 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-07-26  6:43 [PATCH 1/3] xfs/530: Do not pass block size argument to _scratch_mkfs Chandan Babu R
2021-07-26  6:43 ` [PATCH 2/3] common/xfs: Add helpers to obtain reflink/rmapbt status of a filesystem Chandan Babu R
2021-07-26  6:43 ` [PATCH 3/3] xfs/530: Bail out if either of reflink or rmapbt is enabled Chandan Babu R
2021-07-26 17:19   ` Darrick J. Wong [this message]
2021-07-27  4:45     ` Chandan Babu R
2021-07-27 18:37       ` Darrick J. Wong
2021-07-28  2:35         ` Chandan Babu R
2021-08-01 11:41         ` Eryu Guan
2021-08-01 13:10           ` Eryu Guan
2021-07-26 17:08 ` [PATCH 1/3] xfs/530: Do not pass block size argument to _scratch_mkfs Darrick J. Wong
2021-08-01 11:18   ` Eryu Guan

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=20210726171916.GV559212@magnolia \
    --to=djwong@kernel.org \
    --cc=chandanrlinux@gmail.com \
    --cc=fstests@vger.kernel.org \
    --cc=guaneryu@gmail.com \
    --cc=linux-xfs@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