fstests.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] fstests: Disable realtime inherit flag when executing xfs/{532,533,538}
@ 2021-04-09 12:49 Chandan Babu R
  2021-04-09 15:19 ` Darrick J. Wong
  0 siblings, 1 reply; 2+ messages in thread
From: Chandan Babu R @ 2021-04-09 12:49 UTC (permalink / raw)
  To: fstests; +Cc: Chandan Babu R, linux-xfs, djwong

The minimum length space allocator (i.e. xfs_bmap_exact_minlen_extent_alloc())
depends on the underlying filesystem to be fragmented so that there are enough
one block sized extents available to satify space allocation requests.

xfs/{532,533,538} tests issue space allocation requests for metadata (e.g. for
blocks holding directory and xattr information). With realtime filesystem
instances, these tests would end up fragmenting the space on realtime
device. Hence minimum length space allocator fails since the regular
filesystem space is not fragmented and hence there are no one block sized
extents available.

Thus, this commit disables realtime inherit flag (if any) on root directory so
that space on data device gets fragmented rather than realtime device.

Suggested-by: Darrick J. Wong <djwong@kernel.org>
Reported-by: Darrick J. Wong <djwong@kernel.org>
Signed-off-by: Chandan Babu R <chandanrlinux@gmail.com>
---
 tests/xfs/532 | 4 ++++
 tests/xfs/533 | 4 ++++
 tests/xfs/538 | 4 ++++
 3 files changed, 12 insertions(+)

diff --git a/tests/xfs/532 b/tests/xfs/532
index 2bed574a..560af586 100755
--- a/tests/xfs/532
+++ b/tests/xfs/532
@@ -45,6 +45,10 @@ echo "Format and mount fs"
 _scratch_mkfs_sized $((1024 * 1024 * 1024)) >> $seqres.full
 _scratch_mount >> $seqres.full
 
+# Disable realtime inherit flag (if any) on root directory so that space on data
+# device gets fragmented rather than realtime device.
+$XFS_IO_PROG -c 'chattr -t' $SCRATCH_MNT
+
 bsize=$(_get_block_size $SCRATCH_MNT)
 
 attr_len=255
diff --git a/tests/xfs/533 b/tests/xfs/533
index be909fcc..dd4cb4c4 100755
--- a/tests/xfs/533
+++ b/tests/xfs/533
@@ -56,6 +56,10 @@ echo "Format and mount fs"
 _scratch_mkfs_sized $((1024 * 1024 * 1024)) >> $seqres.full
 _scratch_mount >> $seqres.full
 
+# Disable realtime inherit flag (if any) on root directory so that space on data
+# device gets fragmented rather than realtime device.
+$XFS_IO_PROG -c 'chattr -t' $SCRATCH_MNT
+
 echo "Consume free space"
 fillerdir=$SCRATCH_MNT/fillerdir
 nr_free_blks=$(stat -f -c '%f' $SCRATCH_MNT)
diff --git a/tests/xfs/538 b/tests/xfs/538
index 90eb1637..97273b88 100755
--- a/tests/xfs/538
+++ b/tests/xfs/538
@@ -42,6 +42,10 @@ echo "Format and mount fs"
 _scratch_mkfs_sized $((1024 * 1024 * 1024)) >> $seqres.full
 _scratch_mount >> $seqres.full
 
+# Disable realtime inherit flag (if any) on root directory so that space on data
+# device gets fragmented rather than realtime device.
+$XFS_IO_PROG -c 'chattr -t' $SCRATCH_MNT
+
 bsize=$(_get_file_block_size $SCRATCH_MNT)
 
 echo "Consume free space"
-- 
2.29.2


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

* Re: [PATCH] fstests: Disable realtime inherit flag when executing xfs/{532,533,538}
  2021-04-09 12:49 [PATCH] fstests: Disable realtime inherit flag when executing xfs/{532,533,538} Chandan Babu R
@ 2021-04-09 15:19 ` Darrick J. Wong
  0 siblings, 0 replies; 2+ messages in thread
From: Darrick J. Wong @ 2021-04-09 15:19 UTC (permalink / raw)
  To: Chandan Babu R; +Cc: fstests, linux-xfs

On Fri, Apr 09, 2021 at 06:19:03PM +0530, Chandan Babu R wrote:
> The minimum length space allocator (i.e. xfs_bmap_exact_minlen_extent_alloc())
> depends on the underlying filesystem to be fragmented so that there are enough
> one block sized extents available to satify space allocation requests.
> 
> xfs/{532,533,538} tests issue space allocation requests for metadata (e.g. for
> blocks holding directory and xattr information). With realtime filesystem
> instances, these tests would end up fragmenting the space on realtime
> device. Hence minimum length space allocator fails since the regular
> filesystem space is not fragmented and hence there are no one block sized
> extents available.
> 
> Thus, this commit disables realtime inherit flag (if any) on root directory so
> that space on data device gets fragmented rather than realtime device.
> 
> Suggested-by: Darrick J. Wong <djwong@kernel.org>
> Reported-by: Darrick J. Wong <djwong@kernel.org>
> Signed-off-by: Chandan Babu R <chandanrlinux@gmail.com>

Looks good to me,
Reviewed-by: Darrick J. Wong <djwong@kernel.org>

--D

> ---
>  tests/xfs/532 | 4 ++++
>  tests/xfs/533 | 4 ++++
>  tests/xfs/538 | 4 ++++
>  3 files changed, 12 insertions(+)
> 
> diff --git a/tests/xfs/532 b/tests/xfs/532
> index 2bed574a..560af586 100755
> --- a/tests/xfs/532
> +++ b/tests/xfs/532
> @@ -45,6 +45,10 @@ echo "Format and mount fs"
>  _scratch_mkfs_sized $((1024 * 1024 * 1024)) >> $seqres.full
>  _scratch_mount >> $seqres.full
>  
> +# Disable realtime inherit flag (if any) on root directory so that space on data
> +# device gets fragmented rather than realtime device.
> +$XFS_IO_PROG -c 'chattr -t' $SCRATCH_MNT
> +
>  bsize=$(_get_block_size $SCRATCH_MNT)
>  
>  attr_len=255
> diff --git a/tests/xfs/533 b/tests/xfs/533
> index be909fcc..dd4cb4c4 100755
> --- a/tests/xfs/533
> +++ b/tests/xfs/533
> @@ -56,6 +56,10 @@ echo "Format and mount fs"
>  _scratch_mkfs_sized $((1024 * 1024 * 1024)) >> $seqres.full
>  _scratch_mount >> $seqres.full
>  
> +# Disable realtime inherit flag (if any) on root directory so that space on data
> +# device gets fragmented rather than realtime device.
> +$XFS_IO_PROG -c 'chattr -t' $SCRATCH_MNT
> +
>  echo "Consume free space"
>  fillerdir=$SCRATCH_MNT/fillerdir
>  nr_free_blks=$(stat -f -c '%f' $SCRATCH_MNT)
> diff --git a/tests/xfs/538 b/tests/xfs/538
> index 90eb1637..97273b88 100755
> --- a/tests/xfs/538
> +++ b/tests/xfs/538
> @@ -42,6 +42,10 @@ echo "Format and mount fs"
>  _scratch_mkfs_sized $((1024 * 1024 * 1024)) >> $seqres.full
>  _scratch_mount >> $seqres.full
>  
> +# Disable realtime inherit flag (if any) on root directory so that space on data
> +# device gets fragmented rather than realtime device.
> +$XFS_IO_PROG -c 'chattr -t' $SCRATCH_MNT
> +
>  bsize=$(_get_file_block_size $SCRATCH_MNT)
>  
>  echo "Consume free space"
> -- 
> 2.29.2
> 

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

end of thread, other threads:[~2021-04-09 15:19 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-04-09 12:49 [PATCH] fstests: Disable realtime inherit flag when executing xfs/{532,533,538} Chandan Babu R
2021-04-09 15:19 ` Darrick J. Wong

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).