Re: [PATCH 4/6] generic/269: require no compression

[Date Prev] [Date Next] [Thread Prev] [Thread Next] [Date Index] [Thread Index]



On 5/17/24 06:12, David Sterba wrote:
From: Josef Bacik <josef@xxxxxxxxxxxxxx>

This is meant to test ENOSPC, but we're dd'ing /dev/zero, which won't
fill up anything with compression on.

Additionally we're killing dd and then immediately trying to unmount.
With compression we could have references to the inode being held by the
async compression workers, so sometimes this will fail with EBUSY on the
unmount.

Make it easier on us and just skip this if we have compression enabled.

Signed-off-by: Josef Bacik <josef@xxxxxxxxxxxxxx>
Signed-off-by: David Sterba <dsterba@xxxxxxxx>
---
  tests/generic/269 | 3 +++
  1 file changed, 3 insertions(+)

diff --git a/tests/generic/269 b/tests/generic/269
index b7cdecd94f219a..6ee0cb04581632 100755
--- a/tests/generic/269
+++ b/tests/generic/269
@@ -11,6 +11,9 @@ _begin_fstest auto rw prealloc ioctl enospc stress
# Import common functions.
  . ./common/filter
+
+_require_no_compress
+
  # Disable all sync operations to get higher load
  FSSTRESS_AVOID="$FSSTRESS_AVOID -ffsync=0 -fsync=0 -ffdatasync=0"
  _workout()


Can we use _ddt to fill the file with partially compressible data?
On a laptop, with compression, it takes 63s (otherwise 45s).
If we're ok with this, I'll sort it out here. Git diff below.

Thanks, Anand


------
MOUNT_OPTIONS -- -o compress /dev/sdc1 /mnt/scratch

generic/269 45s ...  63s
Ran: generic/269
Passed all 1 tests
------


diff --git a/tests/generic/269 b/tests/generic/269
index b7cdecd94f21..29f453735fc2 100755
--- a/tests/generic/269
+++ b/tests/generic/269
@@ -29,7 +29,7 @@ _workout()
        for ((i=0; i < num_iterations; i++))
        do
                # File will be opened with O_TRUNC each time
-               dd if=/dev/zero of=$SCRATCH_MNT/SPACE_CONSUMER bs=1M \
+               _ddt of=$SCRATCH_MNT/SPACE_CONSUMER bs=1M \
                        >> $seqres.full 2>&1
                sleep $enospc_time
        done







[Index of Archives]     [Linux Filesystems Development]     [Linux NFS]     [Linux NILFS]     [Linux USB Devel]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]

  Powered by Linux