From: Dave Chinner <david@fromorbit.com>
To: Eric Sandeen <sandeen@redhat.com>
Cc: xfs-oss <xfs@oss.sgi.com>
Subject: Re: [PATCH] xfstests: automatically add -F to xfs_io on non-xfs
Date: Mon, 6 May 2013 10:04:25 +1000 [thread overview]
Message-ID: <20130506000425.GI19978@dastard> (raw)
In-Reply-To: <51850BED.6050109@redhat.com>
On Sat, May 04, 2013 at 08:23:57AM -0500, Eric Sandeen wrote:
> The -F flag to xfs_io originally enabled it to operate on non-xfs
> filesystems. This restriction was removed upstream in favor of
> gracefully failing on the handful of operations that actually
> required xfs, and the option was deprecated.
>
> However, xfstests is still used on distros with older xfsprogs, and
> so "xfs_io -F" was necessary throughout xfstests.
>
> Simplify this by appending -F to XFS_IO_PROG when it's exported,
> if we're not running on an xfs filesystem.
>
> This will eliminate errors when new tests leave out the -F, and
> if and when -F is finally removed, there will be one central location
> in xfstests to update.
>
> Signed-off-by: Eric Sandeen <sandeen@redhat.com>
All looks good, but....
> ---
>
> diff --git a/common/config b/common/config
> index 67c1498..554a2c2 100644
> --- a/common/config
> +++ b/common/config
> @@ -157,6 +157,8 @@ export XFS_REPAIR_PROG="`set_prog_path xfs_repair`"
> export XFS_DB_PROG="`set_prog_path xfs_db`"
> export XFS_GROWFS_PROG=`set_prog_path xfs_growfs`
> export XFS_IO_PROG="`set_prog_path xfs_io`"
> +# Older xfs_io refuses to run w/o -F on non-xfs
> +[ "$FSTYP" != "xfs" ] && export XFS_IO_PROG="$XFS_IO_PROG -F"
I wonder if we can be smarter about this, and not set it on versions
of xfs_io that don't need it so we don't have to care about future
versions of xfs_io that might remove the option completely rather
than silently ignore it?
For example, after we've validated the $TEST_DEV in common/rc, run
an xfs_io command on the TEST_DIR and determine if the -F flag is
required? We do all sorts of additional checks in common/rc after
including common/config, so perhaps fixing this is better done in
common/rc rather than common/config....
Other than that, the change looks good.
Cheers,
Dave.
--
Dave Chinner
david@fromorbit.com
_______________________________________________
xfs mailing list
xfs@oss.sgi.com
http://oss.sgi.com/mailman/listinfo/xfs
next prev parent reply other threads:[~2013-05-06 0:04 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-05-04 13:23 [PATCH] xfstests: automatically add -F to xfs_io on non-xfs Eric Sandeen
2013-05-06 0:04 ` Dave Chinner [this message]
2013-05-08 2:35 ` [PATCH V2] " Eric Sandeen
2013-05-08 2:41 ` Dave Chinner
2013-05-14 13:42 ` Rich Johnston
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=20130506000425.GI19978@dastard \
--to=david@fromorbit.com \
--cc=sandeen@redhat.com \
--cc=xfs@oss.sgi.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