From: Eryu Guan <eguan@redhat.com>
To: Dave Chinner <david@fromorbit.com>
Cc: fstests@vger.kernel.org, linux-ext4@vger.kernel.org
Subject: Re: [PATCH] ext4: test partial blocksize defrag integrity issue
Date: Thu, 11 Feb 2016 11:36:28 +0800 [thread overview]
Message-ID: <20160211033628.GZ11419@eguan.usersys.redhat.com> (raw)
In-Reply-To: <20160210231614.GC19486@dastard>
On Thu, Feb 11, 2016 at 10:16:14AM +1100, Dave Chinner wrote:
> On Wed, Feb 10, 2016 at 11:17:44PM +0800, Eryu Guan wrote:
> > Calling EXT4_IOC_MOVE_EXTENT on file not aligned with block size and
> > block size is smaller than page size would cause integrity issue on the
> > partial-blocksize part when copying data between orign file and donor
> > file.
> >
> > This ext4 kernel patch would fix it, titled
> > "ext4: don't read blocks from disk after extents being swapped in
> > move_extent_per_page())"
> >
> > Though this bug only happens in the blocksize smaller than pagesize
> > case, there's no harm to test on various block size fs, so no block size
> > is specified in the test, it depends on the test configurations.
> >
> > Signed-off-by: Eryu Guan <eguan@redhat.com>
> > ---
> > tests/ext4/020 | 89 ++++++++++++++++++++++++++++++++++++++++++++++++++++++
> > tests/ext4/020.out | 6 ++++
> > tests/ext4/group | 1 +
> > 3 files changed, 96 insertions(+)
> > create mode 100755 tests/ext4/020
> > create mode 100644 tests/ext4/020.out
> >
> > diff --git a/tests/ext4/020 b/tests/ext4/020
> > new file mode 100755
> > index 0000000..6740c7e
> > --- /dev/null
> > +++ b/tests/ext4/020
> > @@ -0,0 +1,89 @@
> > +#! /bin/bash
> > +# FS QA Test 020
> > +#
> > +# Test partial blocksize defrag integrity issue.
> > +#
> > +# Calling EXT4_IOC_MOVE_EXTENT on file not aligned with block size and block
> > +# size is smaller than page size would cause integrity issue on the
> > +# partial-blocksize part when copying data between orign file and donor file.
> > +#
> > +#-----------------------------------------------------------------------
> > +# Copyright (c) 2016 Red Hat Inc. All Rights Reserved.
> > +#
> > +# This program is free software; you can redistribute it and/or
> > +# modify it under the terms of the GNU General Public License as
> > +# published by the Free Software Foundation.
> > +#
> > +# This program is distributed in the hope that it would be useful,
> > +# but WITHOUT ANY WARRANTY; without even the implied warranty of
> > +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
> > +# GNU General Public License for more details.
> > +#
> > +# You should have received a copy of the GNU General Public License
> > +# along with this program; if not, write the Free Software Foundation,
> > +# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
> > +#-----------------------------------------------------------------------
> > +#
> > +
> > +seq=`basename $0`
> > +seqres=$RESULT_DIR/$seq
> > +echo "QA output created by $seq"
> > +
> > +here=`pwd`
> > +tmp=/tmp/$$
> > +status=1 # failure is the default!
> > +trap "_cleanup; exit \$status" 0 1 2 3 15
> > +
> > +_cleanup()
> > +{
> > + cd /
> > + rm -f $tmp.*
> > +}
> > +
> > +# get standard environment, filters and checks
> > +. ./common/rc
> > +. ./common/filter
> > +. ./common/defrag
> > +
> > +# remove previous $seqres.full before test
> > +rm -f $seqres.full
> > +
> > +# real QA test starts here
> > +_supported_fs ext4
> > +_supported_os Linux
> > +_require_scratch
> > +_require_defrag
> > +
> > +e4compact=$here/src/e4compact
> > +if [ ! -x $d4compact ]; then
> ^^^^^^^^^
My test run didn't complain about missing the binary and I found out
that I should have added quotes around $d4compact, that way test _notrun
as expect and catches the typo. Thanks for the review!
> > + _notrun "$e4compact executable not found"
> > +fi
>
> And, yes, we really need that _requires_test_command function that
> Darrick was adding to his patchset...
I'll wait for the new patch from Darrick and send v2 then.
Thanks,
Eryu
next prev parent reply other threads:[~2016-02-11 3:36 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-02-10 15:17 [PATCH] ext4: test partial blocksize defrag integrity issue Eryu Guan
2016-02-10 23:16 ` Dave Chinner
2016-02-11 3:36 ` Eryu Guan [this message]
2016-02-11 16:55 ` Darrick J. Wong
-- strict thread matches above, loose matches on Subject: below --
2016-02-10 14:48 Eryu Guan
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=20160211033628.GZ11419@eguan.usersys.redhat.com \
--to=eguan@redhat.com \
--cc=david@fromorbit.com \
--cc=fstests@vger.kernel.org \
--cc=linux-ext4@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