[PATCH 6/8] punch: skip fpunch tests when op length not congruent with file allocation unit

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

 



From: Darrick J. Wong <djwong@xxxxxxxxxx>

Skip the generic fpunch tests on a file when the file's allocation unit
size is not congruent with the proposed testing operations.

This can be the case when we're testing reflink and fallocate on the XFS
realtime device.  For those configurations, the file allocation unit is
a realtime extent, which can be any integer multiple of the block size.
If the request length isn't an exact multiple of the allocation unit
size, reflink and fallocate will fail due to alignment issues, so
there's no point in running these tests.

Assuming this edgecase configuration of an edgecase feature is
vanishingly rare, let's just _notrun the tests instead of rewriting a
ton of tests to do their integrity checking by hand.

Signed-off-by: Darrick J. Wong <djwong@xxxxxxxxxx>
---
 common/punch |    1 +
 1 file changed, 1 insertion(+)


diff --git a/common/punch b/common/punch
index 4d16b898..47a29c92 100644
--- a/common/punch
+++ b/common/punch
@@ -250,6 +250,7 @@ _test_generic_punch()
 	_8k="$((multiple * 8))k"
 	_12k="$((multiple * 12))k"
 	_20k="$((multiple * 20))k"
+	_require_congruent_file_oplen "$(dirname "$testfile")" $((multiple * 4096))
 
 	# initial test state must be defined, otherwise the first test can fail
 	# due ot stale file state left from previous tests.




[Index of Archives]     [XFS Filesystem Development (older mail)]     [Linux Filesystem Development]     [Linux Audio Users]     [Yosemite Trails]     [Linux Kernel]     [Linux RAID]     [Linux SCSI]


  Powered by Linux