From: Dave Chinner <david@fromorbit.com>
To: Eryu Guan <guaneryu@gmail.com>
Cc: Christoph Hellwig <hch@lst.de>, fstests@vger.kernel.org
Subject: Re: [PATCH] generic: detect preallocation support for fsx tests 075 and 112
Date: Mon, 11 Feb 2019 11:37:41 +1100 [thread overview]
Message-ID: <20190211003741.GC20493@dastard> (raw)
In-Reply-To: <20190210111142.GU2713@desktop>
On Sun, Feb 10, 2019 at 07:11:42PM +0800, Eryu Guan wrote:
> On Tue, Feb 05, 2019 at 07:47:13PM +0100, Christoph Hellwig wrote:
> > Currently generic/075 and generic/112 have two extra fsx passes each that
> > exercise fsx with preallocation, which are only enabled for XFS.
> >
> > These tests can also be run with other file systems, given that the XFS
> > prealloc ioctls are implemented in generic code since the addition of
> > the fallocate system call. This also means a version of XFS that does
> > not support preallocation (e.g. because it always writes out of place)
> > can skip the prealloc tests while still completing the normal fsx tests
> > just fine.
> >
> > Signed-off-by: Christoph Hellwig <hch@lst.de>
> > ---
> > tests/generic/075 | 16 +++++++++++-----
> > tests/generic/112 | 20 +++++++++++++-------
> > 2 files changed, 24 insertions(+), 12 deletions(-)
> >
> > diff --git a/tests/generic/075 b/tests/generic/075
> > index 2b957891..8981c560 100755
> > --- a/tests/generic/075
> > +++ b/tests/generic/075
> > @@ -48,11 +48,12 @@ _do_test()
> > echo "fsx.$_n : $_filter_param"
> > echo "-----------------------------------------------"
> >
> > - if [ "$FSTYP" != "xfs" ]
> > - then
> > - if [ "$_n" = "1" -o "$_n" = "3" ]
> > - then
> > - # HACK: only xfs handles preallocation (-x) so just skip this test
> > + if [ "$_n" = "1" -o "$_n" = "3" ]; then
> > + if echo $testio | grep -q "Operation not supported"; then
>
> Hmm, I don't think checking ENOSUPP message is sufficient, old distros
> may ship xfs_io without falloc support or there's no generic prealloc
> ioctl support, these cases are rare but possible.
>
> How about adding a new XFS_IOC_RESVSP ioctl check in src/feature.c and
xfs_io -c "resvsp 0 1g" ...
Cheers,
Dave.
--
Dave Chinner
david@fromorbit.com
next prev parent reply other threads:[~2019-02-11 0:37 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2019-02-05 18:47 [PATCH] generic: detect preallocation support for fsx tests 075 and 112 Christoph Hellwig
2019-02-10 11:11 ` Eryu Guan
2019-02-11 0:37 ` Dave Chinner [this message]
2019-02-14 5:47 ` Eryu Guan
2019-02-14 22:27 ` Dave Chinner
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=20190211003741.GC20493@dastard \
--to=david@fromorbit.com \
--cc=fstests@vger.kernel.org \
--cc=guaneryu@gmail.com \
--cc=hch@lst.de \
/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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.