From: "Theodore Ts'o" <tytso@mit.edu>
To: Dave Chinner <david@fromorbit.com>
Cc: fstests@vger.kernel.org
Subject: Re: [PATCH] common: introduce XFS_IO_AVOID env var
Date: Sun, 18 Oct 2015 18:08:05 -0400 [thread overview]
Message-ID: <20151018220805.GN2678@thunk.org> (raw)
In-Reply-To: <20151018213745.GX27164@dastard>
On Mon, Oct 19, 2015 at 08:37:45AM +1100, Dave Chinner wrote:
> On Sat, Oct 17, 2015 at 02:45:18PM -0400, Theodore Ts'o wrote:
> > Like FSSTRESS_AVOID and FSX_AVOID, XFS_IO_AVOID can be used to avoid
> > using various advanced file system features such as "fpunch"
> > "fcollapse", "finsert", or "zero". Tests that require an xfs_io
> > command which is included in the space-separated list found in the
> > XFS_IO_AVOID environment variable will be skipped using _notrun.
>
> This tells me what the change does, not why you need it.
We didn't go into as much detail for FSX_AVOID and FSSTRESS_AVOID, but
it's basically for the same reason. Sometimes we might want to
exclude certain operational modes from the xfststs.
As one example, currently xfstests doesn't understand the difference
between the allocation cluster size and the block size. In the case
of collapse/insert range, it means operations need to be done in
cluster-aligned chunks, as opposed to block-aligned clusters. So to
suppress test noise it's nice if we can suppress all attempts to use
insert_range/collapse_range while running a test --- and using
FSX_AVOID and FSSTRESS_AVOID isn't sufficient for this purpose.
(As you may recall, I while back had a test patch allowed the file
system to claim that it doesn't support collapse or insert range, and
you and Eric argued that the right way to handle this was using
environment variables like FSX_AVOID and FSSTRESS_AVOID to cause
xfstests to avoid to use certain fallocate operational modes.
XFS_IO_AVOID is basically an extension of that same functionality.
Without this, hacking the kernel to always fail certain fallocate mode
is still needed in order to force certain tests to be skipped.)
As another example, recently I was trying to debug a memory leak, both
on the most recent version of the kernel, as well as old stable
kernels, and it's very useful to be able to see if a particular bug
might be caused by say, buggy collapse range support.
So I wanted to be able to suppress all use of collapse range by being
able to do something as simple as "gce-xfstests --no-collapse". This
gets expanded to setting the FSX_AVOID, FSSTRESS_AVOID, and
XFS_IO_AVOID environment variables.
This way it becomes easier to see if certain test failures go away if
an fallocate operational mode is suppressed --- and hence, allows us
to localize the failure to collapse_range or insert_range.
Cheers,
- Ted
next prev parent reply other threads:[~2015-10-18 22:08 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-10-17 18:45 [PATCH] common: introduce XFS_IO_AVOID env var Theodore Ts'o
2015-10-18 21:37 ` Dave Chinner
2015-10-18 22:08 ` Theodore Ts'o [this message]
2015-10-18 23:14 ` Dave Chinner
2015-10-19 0:10 ` Theodore Ts'o
2015-10-19 2:29 ` 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=20151018220805.GN2678@thunk.org \
--to=tytso@mit.edu \
--cc=david@fromorbit.com \
--cc=fstests@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