public inbox for linux-xfs@vger.kernel.org
 help / color / mirror / Atom feed
* [PATCH] xfs: skip fragmentation tests when alwayscow mode is enabled, part 2
@ 2023-08-04 21:34 Darrick J. Wong
  2023-08-05 13:51 ` Zorro Lang
  0 siblings, 1 reply; 2+ messages in thread
From: Darrick J. Wong @ 2023-08-04 21:34 UTC (permalink / raw)
  To: Zorro Lang; +Cc: fstests, linux-xfs

From: Darrick J. Wong <djwong@kernel.org>

If the always_cow debugging flag is enabled, all file writes turn into
copy writes.  This dramatically ramps up fragmentation in the filesystem
(intentionally!) so there's no point in complaining about fragmentation.

I missed these two in the original commit because readahead for md5sum
would create large folios at the start of the file.  This resulted in
the fdatatasync after the random writes issuing writeback for the whole
large folio, which reduced file fragmentation to the point where this
test started passing.

With Ritesh's patchset implementing sub-folio dirty tracking, this test
goes back to failing due to high fragmentation (as it did before large
folios) so we need to mask these off too.

Signed-off-by: Darrick J. Wong <djwong@kernel.org>
---
 tests/xfs/180 |    1 +
 tests/xfs/208 |    1 +
 2 files changed, 2 insertions(+)

diff --git a/tests/xfs/180 b/tests/xfs/180
index cfea2020ce..d2fac03a9e 100755
--- a/tests/xfs/180
+++ b/tests/xfs/180
@@ -23,6 +23,7 @@ _require_scratch_reflink
 _require_cp_reflink
 _require_xfs_io_command "fiemap"
 _require_xfs_io_command "cowextsize"
+_require_no_xfs_always_cow
 
 echo "Format and mount"
 _scratch_mkfs > $seqres.full 2>&1
diff --git a/tests/xfs/208 b/tests/xfs/208
index 9a71b74f6f..1e7734b822 100755
--- a/tests/xfs/208
+++ b/tests/xfs/208
@@ -26,6 +26,7 @@ _require_scratch_reflink
 _require_cp_reflink
 _require_xfs_io_command "fiemap"
 _require_xfs_io_command "cowextsize"
+_require_no_xfs_always_cow
 
 echo "Format and mount"
 _scratch_mkfs > $seqres.full 2>&1

^ permalink raw reply related	[flat|nested] 2+ messages in thread

* Re: [PATCH] xfs: skip fragmentation tests when alwayscow mode is enabled, part 2
  2023-08-04 21:34 [PATCH] xfs: skip fragmentation tests when alwayscow mode is enabled, part 2 Darrick J. Wong
@ 2023-08-05 13:51 ` Zorro Lang
  0 siblings, 0 replies; 2+ messages in thread
From: Zorro Lang @ 2023-08-05 13:51 UTC (permalink / raw)
  To: Darrick J. Wong; +Cc: fstests, linux-xfs

On Fri, Aug 04, 2023 at 02:34:19PM -0700, Darrick J. Wong wrote:
> From: Darrick J. Wong <djwong@kernel.org>
> 
> If the always_cow debugging flag is enabled, all file writes turn into
> copy writes.  This dramatically ramps up fragmentation in the filesystem
> (intentionally!) so there's no point in complaining about fragmentation.
> 
> I missed these two in the original commit because readahead for md5sum
> would create large folios at the start of the file.  This resulted in
> the fdatatasync after the random writes issuing writeback for the whole
> large folio, which reduced file fragmentation to the point where this
> test started passing.
> 
> With Ritesh's patchset implementing sub-folio dirty tracking, this test
> goes back to failing due to high fragmentation (as it did before large
> folios) so we need to mask these off too.
> 
> Signed-off-by: Darrick J. Wong <djwong@kernel.org>
> ---

Good to me, this patch is simple enough and no risk, will be inserted into
the release directly tomorrow.

Reviewed-by: Zorro Lang <zlang@redhat.com>

>  tests/xfs/180 |    1 +
>  tests/xfs/208 |    1 +
>  2 files changed, 2 insertions(+)
> 
> diff --git a/tests/xfs/180 b/tests/xfs/180
> index cfea2020ce..d2fac03a9e 100755
> --- a/tests/xfs/180
> +++ b/tests/xfs/180
> @@ -23,6 +23,7 @@ _require_scratch_reflink
>  _require_cp_reflink
>  _require_xfs_io_command "fiemap"
>  _require_xfs_io_command "cowextsize"
> +_require_no_xfs_always_cow
>  
>  echo "Format and mount"
>  _scratch_mkfs > $seqres.full 2>&1
> diff --git a/tests/xfs/208 b/tests/xfs/208
> index 9a71b74f6f..1e7734b822 100755
> --- a/tests/xfs/208
> +++ b/tests/xfs/208
> @@ -26,6 +26,7 @@ _require_scratch_reflink
>  _require_cp_reflink
>  _require_xfs_io_command "fiemap"
>  _require_xfs_io_command "cowextsize"
> +_require_no_xfs_always_cow
>  
>  echo "Format and mount"
>  _scratch_mkfs > $seqres.full 2>&1
> 


^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2023-08-05 13:52 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2023-08-04 21:34 [PATCH] xfs: skip fragmentation tests when alwayscow mode is enabled, part 2 Darrick J. Wong
2023-08-05 13:51 ` Zorro Lang

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox