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

On Wed, Nov 18, 2020 at 10:44:40AM -0600, Eric Sandeen wrote:
> 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"
> +}

Well it occurred to me that the xfs_db version command has a help
screen that lists all of the things that it knows how to upgrade.
So, it should be easy enough to detect whether or not it makes sense to
test an upgrade path.  Thanks for the suggestion, sorry I was rambling
about this being harder a few days ago... :/

--D

> 
> 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

  reply	other threads:[~2020-11-20  1:53 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
2020-11-20  1:53     ` Darrick J. Wong [this message]
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=20201120015326.GC3837269@magnolia \
    --to=darrick.wong@oracle.com \
    --cc=fstests@vger.kernel.org \
    --cc=guaneryu@gmail.com \
    --cc=linux-xfs@vger.kernel.org \
    --cc=sandeen@sandeen.net \
    /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).