linux-xfs.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Eric Sandeen <sandeen@sandeen.net>
To: "Darrick J. Wong" <darrick.wong@oracle.com>, guaneryu@gmail.com
Cc: linux-xfs@vger.kernel.org, fstests@vger.kernel.org
Subject: Re: [PATCH 2/2] xfs: test inobtcount upgrade
Date: Wed, 18 Nov 2020 10:44:40 -0600	[thread overview]
Message-ID: <de3588f9-e80a-b9ba-cb03-16d538060675@sandeen.net> (raw)
In-Reply-To: <160382542877.1203756.11339393830951325848.stgit@magnolia>

On 10/27/20 2:03 PM, Darrick J. Wong wrote:
> From: Darrick J. Wong <darrick.wong@oracle.com>
> 
> Make sure we can actually upgrade filesystems to support inobtcounts.
> 
> Signed-off-by: Darrick J. Wong <darrick.wong@oracle.com>
> ---
>  common/xfs        |   16 ++++++++++++
>  tests/xfs/910     |   72 +++++++++++++++++++++++++++++++++++++++++++++++++++++
>  tests/xfs/910.out |    3 ++
>  tests/xfs/group   |    1 +
>  4 files changed, 92 insertions(+)
>  create mode 100755 tests/xfs/910
>  create mode 100644 tests/xfs/910.out
> 
> 
> diff --git a/common/xfs b/common/xfs
> index 3f5c14ba..e548a0a1 100644
> --- a/common/xfs
> +++ b/common/xfs
> @@ -978,3 +978,19 @@ _require_xfs_copy()
>  	[ "$USE_EXTERNAL" = yes ] && \
>  		_notrun "Cannot xfs_copy with external devices"
>  }
> +
> +_require_xfs_mkfs_inobtcount()
> +{
> +	_scratch_mkfs_xfs_supported -m inobtcount=1 >/dev/null 2>&1 \
> +	   || _notrun "mkfs.xfs doesn't have inobtcount feature"
> +}

I'd like to also add:

+_require_xfs_admin_upgrade()
+{
+	local feature="$1"
+
+	_require_scratch
+	# Catch missing "-O" or missing feature handling
+	_scratch_xfs_admin -O $feature 2>&1 | grep "illegal option\|Cannot change" \
+		&& _notrun "xfs_admin does not support upgrading $1"
+}

and then:

...

> +# real QA test starts here
> +_supported_fs xfs
> +_require_command "$XFS_ADMIN_PROG" "xfs_admin"
> +_require_xfs_mkfs_inobtcount
> +_require_xfs_scratch_inobtcount

+_require_xfs_admin_upgrade "inobtcount"

to be sure that the upgrade command is also supported by xfs_admin.  By the time
we get to release, both mkfs & xfs_admin should both support it, but I'm hedging
my bets on the upgrade path just a little,and it seems best to explicitly test
both requirements.

that helper can be re-used on the bigtime upgrade test as well and anything else
that requires an xfs_admin upgrade path ...

Thanks,
-Eric

  parent reply	other threads:[~2020-11-18 16:44 UTC|newest]

Thread overview: 17+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-10-27 19:03 [PATCH RFCv4 0/2] xfstests: add inode btree blocks counters to the AGI header Darrick J. Wong
2020-10-27 19:03 ` [PATCH 1/2] xfs/122: embiggen struct xfs_agi size for inobtcount feature Darrick J. Wong
2020-10-29 17:39   ` Brian Foster
2020-10-29 20:27     ` Darrick J. Wong
2020-10-27 19:03 ` [PATCH 2/2] xfs: test inobtcount upgrade Darrick J. Wong
2020-10-29 17:40   ` Brian Foster
2020-10-29 20:31     ` Darrick J. Wong
2020-11-18 16:44   ` Eric Sandeen [this message]
2020-11-20  1:53     ` Darrick J. Wong
2021-03-31  1:08 [PATCHSET v2 0/2] fstests: add inode btree blocks counters to the AGI header Darrick J. Wong
2021-03-31  1:08 ` [PATCH 2/2] xfs: test inobtcount upgrade Darrick J. Wong
2021-03-31 17:36   ` Brian Foster
2021-04-03  0:29     ` Darrick J. Wong
2021-04-21  0:22 [PATCHSET v2 0/2] fstests: add inode btree blocks counters to the AGI header Darrick J. Wong
2021-04-21  0:22 ` [PATCH 2/2] xfs: test inobtcount upgrade Darrick J. Wong
2021-04-21  5:52   ` Amir Goldstein
2021-04-22  0:50     ` Darrick J. Wong
2021-04-21 18:00   ` Brian Foster
2021-04-22  0:29   ` Allison Henderson

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=de3588f9-e80a-b9ba-cb03-16d538060675@sandeen.net \
    --to=sandeen@sandeen.net \
    --cc=darrick.wong@oracle.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;
as well as URLs for NNTP newsgroup(s).