[PATCH] fstests: generic/407: Use _reflink_range to avoid old xfs_io bug

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



Old xfs_io has a bug that even its man page shows that reflink can accept
one parameter, but in fact xfs_io reflink still needs full 4 parameters.

In this test case, it only needs to reflink the file and we know the
size of the file, so use _reflink_range() to replace open-coded reflink,
which makes the test case pass even its xfs_io is a little old and
doesn't accept single parameter.

Signed-off-by: Qu Wenruo <quwenruo@xxxxxxxxxxxxxx>
---
 tests/generic/407 | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/tests/generic/407 b/tests/generic/407
index 1103d40..7d5a865 100755
--- a/tests/generic/407
+++ b/tests/generic/407
@@ -65,7 +65,7 @@ echo "before clone: $mtime1 $ctime1" >> $seqres.full
 
 # clone to trigger timestamp change
 sleep 1
-$XFS_IO_PROG -c "reflink $sourcefile " $destfile >> $seqres.full
+_reflink_range $sourcefile 0 $destfile 0 4k >> $seqres.full
 
 # sample and verify that timestamps have changed.
 mtime2=`stat -c %Y $destfile`
-- 
2.9.3



--
To unsubscribe from this list: send the line "unsubscribe fstests" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html



[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