All of lore.kernel.org
 help / color / mirror / Atom feed
From: Eryu Guan <guan@eryu.me>
To: Ritesh Harjani <riteshh@linux.ibm.com>
Cc: fstests@vger.kernel.org, linux-ext4@vger.kernel.org,
	Theodore Ts'o <tytso@mit.edu>,
	"Darrick J . Wong" <djwong@kernel.org>,
	Dave Chinner <david@fromorbit.com>
Subject: Re: [PATCHv2 5/9] generic/031: Fix the test case for 64k blocksize config
Date: Sun, 8 Aug 2021 20:36:11 +0800	[thread overview]
Message-ID: <YQ/PuznWmSgcTQiM@desktop> (raw)
In-Reply-To: <20210803050033.meopotfeooo6n4gu@riteshh-domain>

On Tue, Aug 03, 2021 at 10:30:33AM +0530, Ritesh Harjani wrote:
> On 21/08/02 12:00AM, Eryu Guan wrote:
> > On Wed, Jul 21, 2021 at 10:57:58AM +0530, Ritesh Harjani wrote:
> > > This test fails with blocksize 64k since the test assumes 4k blocksize
> > > in fcollapse param. This patch fixes that and also tests for 64k
> > > blocksize.
> > >
> > > Signed-off-by: Ritesh Harjani <riteshh@linux.ibm.com>
> > > ---
> > >  tests/generic/031     | 14 +++++++++-----
> > >  tests/generic/031.out | 16 ++++++++--------
> > >  2 files changed, 17 insertions(+), 13 deletions(-)
> > >
> > > diff --git a/tests/generic/031 b/tests/generic/031
> > > index 313ce9ff..11961c54 100755
> > > --- a/tests/generic/031
> > > +++ b/tests/generic/031
> > > @@ -26,11 +26,16 @@ testfile=$SCRATCH_MNT/testfile
> > >  _scratch_mkfs > /dev/null 2>&1
> > >  _scratch_mount
> > >
> > > +# fcollapse need offset and len to be multiple of blocksize for filesystems
> > > +# So let's make the offsets and len required for fcollapse multiples of 64K
> > > +# so that it works for all configurations (including on dax on 64K page size
> > > +# systems)
> > > +fact=$((65536/4096))
> > >  $XFS_IO_PROG -f \
> > > -	-c "pwrite 185332 55756" \
> > > -	-c "fcollapse 28672 40960" \
> > > -	-c "pwrite 133228 63394" \
> > > -	-c "fcollapse 0 4096" \
> > > +	-c "pwrite $((185332*fact + 12)) $((55756*fact + 12))" \
> >
> > Where does this 12 come from?
> A random number so that the offset and length are not bocksize aligned.
> If you see the final .out file, you will see the offset of the writes
> remains the same with and before this patch.
> 
> > And I'm wondering if this still reproduces the original bug.
> I am not sure how to trigger this. I know that this test was intended for
> bs < ps cases. If someone can help me / point me to the kernel fix for this,
> I can try to reproduce the original bug too.
> 
> I found this link for this test patch series. Couldn't find the kernel fixes
> link though.
> https://www.spinics.net/lists/fstests/msg00340.html

I think it's a regression test for this patchset.

https://www.spinics.net/lists/xfs/msg29807.html

> 
> 
> >
> > And looks like that the original test setups came from a specific
> > fsstress or fsx run, and aimed to the specific bug, perhaps we could
> > require the test with <= 4k block size, and _notrun in 64k case.
> 
> It would be good to know whether this code could trigger the original bug or
> not. Then we need not make _notrun for 64k case.

Agreed, if we could make sure that updated test still triggers the
original bug, there's no reason _notrun for 64k case.

Thanks,
Eryu

  reply	other threads:[~2021-08-08 12:36 UTC|newest]

Thread overview: 17+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-07-21  5:27 [PATCHv2 0/9] xfstests: 64K blocksize related fixes Ritesh Harjani
2021-07-21  5:27 ` [PATCHv2 1/9] ext4/003: Fix this test on 64K platform for dax config Ritesh Harjani
2021-07-21  5:27 ` [PATCHv2 2/9] ext4/027: Correct the right code of block and inode bitmap Ritesh Harjani
2021-07-21  5:27 ` [PATCHv2 3/9] ext4/306: Add -b blocksize parameter too to avoid failure with DAX config Ritesh Harjani
2021-07-21  5:27 ` [PATCHv2 4/9] ext4/022: exclude this test for dax config on 64KB pagesize platform Ritesh Harjani
2021-07-21  5:27 ` [PATCHv2 5/9] generic/031: Fix the test case for 64k blocksize config Ritesh Harjani
2021-08-01 16:00   ` Eryu Guan
2021-08-03  5:00     ` Ritesh Harjani
2021-08-08 12:36       ` Eryu Guan [this message]
2021-07-21  5:27 ` [PATCHv2 6/9] common/rc: Add _mkfs_dev_blocksized functionality Ritesh Harjani
2021-07-21  5:28 ` [PATCHv2 7/9] generic/620: Use _mkfs_dev_blocksized to use 4k bs Ritesh Harjani
2021-08-01 16:03   ` Eryu Guan
2021-08-03  5:06     ` Ritesh Harjani
2021-08-08 13:32       ` Eryu Guan
2021-07-21  5:28 ` [PATCHv2 8/9] common/attr: Cleanup end of line whitespaces issues Ritesh Harjani
2021-07-21  5:28 ` [PATCHv2 9/9] common/attr: Reduce MAX_ATTRS to leave some overhead for 64K blocksize Ritesh Harjani
2021-08-01 16:05 ` [PATCHv2 0/9] xfstests: 64K blocksize related fixes 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=YQ/PuznWmSgcTQiM@desktop \
    --to=guan@eryu.me \
    --cc=david@fromorbit.com \
    --cc=djwong@kernel.org \
    --cc=fstests@vger.kernel.org \
    --cc=linux-ext4@vger.kernel.org \
    --cc=riteshh@linux.ibm.com \
    --cc=tytso@mit.edu \
    /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.