From: "Darrick J. Wong" <djwong@kernel.org>
To: Zorro Lang <zlang@redhat.com>
Cc: linux-xfs@vger.kernel.org, fstests@vger.kernel.org,
tytso@mit.edu, leah.rumancik@gmail.com
Subject: Re: [PATCH 6/8] punch: skip fpunch tests when op length not congruent with file allocation unit
Date: Wed, 13 Jul 2022 10:33:05 -0700 [thread overview]
Message-ID: <Ys8B0X7iMetn/0Pf@magnolia> (raw)
In-Reply-To: <20220713170426.n5kwuvplsdlabr5l@zlang-mailbox>
On Thu, Jul 14, 2022 at 01:04:26AM +0800, Zorro Lang wrote:
> On Tue, Jul 12, 2022 at 05:57:07PM -0700, Darrick J. Wong wrote:
> > From: Darrick J. Wong <djwong@kernel.org>
> >
> > Skip the generic fpunch tests on a file when the file's allocation unit
> > size is not congruent with the proposed testing operations.
> >
> > This can be the case when we're testing reflink and fallocate on the XFS
> > realtime device. For those configurations, the file allocation unit is
> > a realtime extent, which can be any integer multiple of the block size.
> > If the request length isn't an exact multiple of the allocation unit
> > size, reflink and fallocate will fail due to alignment issues, so
> > there's no point in running these tests.
> >
> > Assuming this edgecase configuration of an edgecase feature is
> > vanishingly rare, let's just _notrun the tests instead of rewriting a
> > ton of tests to do their integrity checking by hand.
> >
> > Signed-off-by: Darrick J. Wong <djwong@kernel.org>
> > ---
> > common/punch | 1 +
> > 1 file changed, 1 insertion(+)
> >
> >
> > diff --git a/common/punch b/common/punch
> > index 4d16b898..7560edf8 100644
> > --- a/common/punch
> > +++ b/common/punch
> > @@ -250,6 +250,7 @@ _test_generic_punch()
> > _8k="$((multiple * 8))k"
> > _12k="$((multiple * 12))k"
> > _20k="$((multiple * 20))k"
> > + _require_congruent_file_oplen $TEST_DIR $((multiple * 4096))
>
> Should the $TEST_DIR be $testfile, or $(dirname $testfile) ?
Ah, right, that ought to be $(dirname $testfile), thanks for catching
that. I guess I didn't catch that because all the current callers pass
in $TEST_DIR/<somefile>, which is functionally the same, but a landmine
nonetheless.
--D
> >
> > # initial test state must be defined, otherwise the first test can fail
> > # due ot stale file state left from previous tests.
> >
>
next prev parent reply other threads:[~2022-07-13 17:33 UTC|newest]
Thread overview: 20+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-07-13 0:56 [PATCHSET 0/8] fstests: check file block congruency of file range operations Darrick J. Wong
2022-07-13 0:56 ` [PATCH 1/8] misc: use _get_file_block_size for block (re)mapping tests Darrick J. Wong
2022-07-13 14:26 ` Zorro Lang
2022-07-13 0:56 ` [PATCH 2/8] misc: skip remap/fallocate tests when op length not congruent with file allocation unit Darrick J. Wong
2022-07-15 18:27 ` Zorro Lang
2022-07-15 22:24 ` Darrick J. Wong
2022-07-16 16:24 ` Zorro Lang
2022-07-18 17:30 ` Darrick J. Wong
2022-07-13 0:56 ` [PATCH 3/8] misc: skip extent size hint tests when hint " Darrick J. Wong
2022-07-13 0:56 ` [PATCH 4/8] misc: avoid tests encoding FIEMAP/BMAP golden output with weird file blocksizes Darrick J. Wong
2022-07-13 0:57 ` [PATCH 5/8] punch: use allocation unit to test punching holes Darrick J. Wong
2022-07-13 0:57 ` [PATCH 6/8] punch: skip fpunch tests when op length not congruent with file allocation unit Darrick J. Wong
2022-07-13 17:04 ` Zorro Lang
2022-07-13 17:33 ` Darrick J. Wong [this message]
2022-07-13 17:51 ` Zorro Lang
2022-07-18 17:31 ` Darrick J. Wong
2022-07-13 0:57 ` [PATCH 7/8] filter: report data block mappings and od offsets in multiples of allocation units Darrick J. Wong
2022-07-13 17:16 ` Zorro Lang
2022-07-13 0:57 ` [PATCH 8/8] punch: skip fpunch tests when page size not congruent with file allocation unit Darrick J. Wong
-- strict thread matches above, loose matches on Subject: below --
2022-07-19 21:37 [PATCHSET v2 0/8] fstests: check file block congruency of file range operations Darrick J. Wong
2022-07-19 21:37 ` [PATCH 6/8] punch: skip fpunch tests when op length not congruent with file allocation unit Darrick J. Wong
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=Ys8B0X7iMetn/0Pf@magnolia \
--to=djwong@kernel.org \
--cc=fstests@vger.kernel.org \
--cc=leah.rumancik@gmail.com \
--cc=linux-xfs@vger.kernel.org \
--cc=tytso@mit.edu \
--cc=zlang@redhat.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