From: Jan Kara <jack@suse.cz>
To: Dave Chinner <david@fromorbit.com>
Cc: Jan Kara <jack@suse.cz>, xfs@oss.sgi.com
Subject: Re: [PATCH] xfstests: Provide test whether fs supports direct IO and use it
Date: Mon, 20 Aug 2012 18:40:42 +0200 [thread overview]
Message-ID: <20120820164042.GB17354@quack.suse.cz> (raw)
In-Reply-To: <20120816230400.GZ2877@dastard>
On Fri 17-08-12 09:04:00, Dave Chinner wrote:
> On Thu, Aug 16, 2012 at 03:56:31PM +0200, Jan Kara wrote:
> > ext3 in data=journal mode does not support direct IO. Tests which use
> > direct IO fail due to that. Provide function checking whether direct IO
> > is supported and skip tests needing direct IO if it's not.
> >
> > There are a few tests which use direct IO but would be meaningful even
> > without it since they test several different things. Making these tests
> > useful for filesystems without dio support is left for future if somebody
> > is interested...
>
> So this is just for the generic tests? There's a lot more XFS
> specific tests that require direct IO that aren't in this patch. ;)
Right but I was a lazy bastard and went just through the tests that
failed for me, checked that they failed due to direct IO, and added the
requirement. I can go through the XFS specific tests and add the
requirement but frankly I find a little use in that.
> Also, I suspect that you've missed all the tests that run fsstress,
> because that uses direct IO as well. There's probably others as
> well. No doub they didn't produce test failures, but it's entirely
> possible that they are not testing what they are supposed to be
> testing as a result of direct IO failing silently...
It's not failing silently. For ext3 we return EINVAL from open so I'd
expect reasonably written tests to complain.
> > --- a/198
> > +++ b/198
> > @@ -44,6 +44,7 @@ _cleanup()
> >
> > _supported_fs generic
> > _supported_os Linux
> > +_require_direct_io
> > _require_aiodio aiodio_sparse2
>
> For all the tests are already call _require_aiodio, just embed the
> _require_dio test inside that one.
OK, will do.
> > +#
> > +# Check if the filesystem supports direct IO
> > +#
> > +_require_direct_io()
> > +{
> > + testfile=$TEST_DIR/$$.dio
> > + testio=`$XFS_IO_PROG -F -f -d -c "" $testfile 2>&1`
>
> This assumes that both the test device and the scratch device are
> both using the same mount options, right?
>
> Some tests use the scratch device with different mount options, so
> may actually allow direct IO to work even though the test device
> fails. I haven't looked at whether any of the tests in this patch do
> that, but if they do then you might also need a _require_scratch_dio
> function for those tests....
I went through all the changed tests and none of them seem to play tricks
with mount options so _require_direct_io should be fine for all of them.
Thanks for review, I'll send a new version of the patch after a test run
finishes.
Honza
--
Jan Kara <jack@suse.cz>
SUSE Labs, CR
_______________________________________________
xfs mailing list
xfs@oss.sgi.com
http://oss.sgi.com/mailman/listinfo/xfs
prev parent reply other threads:[~2012-08-20 16:40 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2012-08-16 13:56 [PATCH] xfstests: Provide test whether fs supports direct IO and use it Jan Kara
2012-08-16 23:04 ` Dave Chinner
2012-08-20 16:40 ` Jan Kara [this message]
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=20120820164042.GB17354@quack.suse.cz \
--to=jack@suse.cz \
--cc=david@fromorbit.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