All of lore.kernel.org
 help / color / mirror / Atom feed
From: Eryu Guan <guaneryu@gmail.com>
To: Christoph Hellwig <hch@lst.de>
Cc: fstests@vger.kernel.org, linux-xfs@vger.kernel.org,
	"Darrick J. Wong" <darrick.wong@oracle.com>
Subject: Re: [PATCH] xfs/420: only check the extent layout after syncing
Date: Sun, 10 Feb 2019 19:14:28 +0800	[thread overview]
Message-ID: <20190210111428.GV2713@desktop> (raw)
In-Reply-To: <20190204153026.1673-1-hch@lst.de>

On Mon, Feb 04, 2019 at 04:30:26PM +0100, Christoph Hellwig wrote:
> This tests validates the correct extent layout for some hairy reflink
> related issues.  But until we called sync or fsync we have no gurantee
> of any data fork layout, as only writeback moves the extents from the
> COW for to the data fork.
> 
> The comparism pass before the sync might see an "error" if we use COW
> fork speculative preallocations for non-overwrites, which is useful to
> reduce fragmentation.
> 
> Just remove the pass of comparisms before the sync, as the one after
> the sync will catch all persistent issues.
> 
> Signed-off-by: Christoph Hellwig <hch@lst.de>

I think this is fine. But I'd like the test author to take a look too.

/me looks at Darrick :)

Thanks,
Eryu

> ---
>  tests/xfs/420     | 14 --------------
>  tests/xfs/420.out | 14 --------------
>  2 files changed, 28 deletions(-)
> 
> diff --git a/tests/xfs/420 b/tests/xfs/420
> index a083a12b..0d611fd6 100755
> --- a/tests/xfs/420
> +++ b/tests/xfs/420
> @@ -93,20 +93,6 @@ $XFS_IO_PROG -c "pwrite -S 0x63 $((blksz * 3)) $blksz" $testdir/file2 >> $seqres
>  $XFS_IO_PROG -c "pwrite -S 0x63 0 $blksz" $testdir/file3 >> $seqres.full
>  $XFS_IO_PROG -c "pwrite -S 0x63 $((blksz * 3)) $blksz" $testdir/file3 >> $seqres.full
>  
> -$XFS_IO_PROG -c "bmap -ev" -c "bmap -cv" $testdir/file1 >> $seqres.full 2>&1
> -$XFS_IO_PROG -c "bmap -ev" -c "bmap -cv" $testdir/file2 >> $seqres.full 2>&1
> -$XFS_IO_PROG -c "bmap -ev" -c "bmap -cv" $testdir/file3 >> $seqres.full 2>&1
> -
> -echo "Seek holes and data in file1"
> -$XFS_IO_PROG -c "seek -a -r 0" $testdir/file1
> -echo "Seek holes and data in file2"
> -$XFS_IO_PROG -c "seek -a -r 0" $testdir/file2
> -
> -echo "Compare files"
> -md5sum $testdir/file1 | _filter_scratch
> -md5sum $testdir/file2 | _filter_scratch
> -md5sum $testdir/file3 | _filter_scratch
> -
>  echo "sync filesystem" | tee -a $seqres.full
>  sync
>  
> diff --git a/tests/xfs/420.out b/tests/xfs/420.out
> index d1b5483a..39360741 100644
> --- a/tests/xfs/420.out
> +++ b/tests/xfs/420.out
> @@ -6,20 +6,6 @@ c2803804acc9936eef8aab42c119bfac  SCRATCH_MNT/test-420/file1
>  c2803804acc9936eef8aab42c119bfac  SCRATCH_MNT/test-420/file2
>  c2803804acc9936eef8aab42c119bfac  SCRATCH_MNT/test-420/file3
>  CoW the shared part then write into the empty part
> -Seek holes and data in file1
> -Whence	Result
> -DATA	0
> -HOLE	131072
> -Seek holes and data in file2
> -Whence	Result
> -DATA	0
> -HOLE	131072
> -DATA	196608
> -HOLE	262144
> -Compare files
> -c2803804acc9936eef8aab42c119bfac  SCRATCH_MNT/test-420/file1
> -017c08a9320aad844ce86aa9631afb98  SCRATCH_MNT/test-420/file2
> -017c08a9320aad844ce86aa9631afb98  SCRATCH_MNT/test-420/file3
>  sync filesystem
>  Seek holes and data in file1
>  Whence	Result
> -- 
> 2.20.1
> 

  reply	other threads:[~2019-02-10 11:14 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-02-04 15:30 [PATCH] xfs/420: only check the extent layout after syncing Christoph Hellwig
2019-02-10 11:14 ` Eryu Guan [this message]
2019-02-11 23:51 ` Darrick J. Wong
2019-02-12 19:00   ` Christoph Hellwig
2019-02-13  5:06     ` 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=20190210111428.GV2713@desktop \
    --to=guaneryu@gmail.com \
    --cc=darrick.wong@oracle.com \
    --cc=fstests@vger.kernel.org \
    --cc=hch@lst.de \
    --cc=linux-xfs@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 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.