This test fails on 32k-fsblock filesystems:
dd: failed to open '/opt/tmp3': No space left on device
dd: failed to open '/opt/tmp4': No space left on device
Pre rm space:
Filesystem Type 1024-blocks Used Available Capacity Mounted on
/dev/sda4 xfs
2031616 2030624 992 100% /opt
Post rm space:
Filesystem Type 1024-blocks Used Available Capacity Mounted on
/dev/sda4 xfs
2031616 2030368 1248 100% /opt
could not sufficiently fill filesystem
On a 32k-fsblock filesystem, creating tmp3 and tmp4 requires more than
1MB for the transaction allocation, which is why this test fails to fill
the filesystem. To fix this, touch the four tmp files before trying to
use up all the free space. The fix in
ef25a29fa49a50 was incomplete.
Cc: fstests@vger.kernel.org # v2022.07.24
Fixes: ef25a29fa49a50 ("generic/275: fix premature enospc errors when fs block size is large")
Signed-off-by: Darrick J. Wong <djwong@kernel.org>
Reviewed-by: Christoph Hellwig <hch@lst.de>
Signed-off-by: Zorro Lang <zlang@kernel.org>
# now when we know there's enough free blocks.
later_file=$SCRATCH_MNT/later
touch $later_file
+for i in 1 2 3 4; do
+ touch $SCRATCH_MNT/tmp$i
+done
# this file will get removed to create 256k of free space after ENOSPC
# conditions are created.