NFSv4.2 supports reflink but does not support FIBMAP nor FIEMAP.
These 4 tests about file content can pass on NFSv4.2, but filefrag
complaints :
+/mnt/testarea/scratch/test-542/file2: FIBMAP unsupported
which is breaking golden output.
Signed-off-by: Murphy Zhou <xzhou@redhat.com>
Reviewed-by: Eryu Guan <guaneryu@gmail.com>
Signed-off-by: Eryu Guan <guaneryu@gmail.com>
# now reflink into the rainbow
echo "before reflink" >> $seqres.full
-$FILEFRAG_PROG -v $testdir/file2 >> $seqres.full
-$FILEFRAG_PROG -v $testdir/file3 >> $seqres.full
+$FILEFRAG_PROG -v $testdir/file2 >> $seqres.full 2>&1
+$FILEFRAG_PROG -v $testdir/file3 >> $seqres.full 2>&1
$XFS_IO_PROG -f -c "reflink $testdir/file2 $roff $roff $rsz" $testdir/file3 >> $seqres.full
_pwrite_byte 0x64 $roff $rsz $testdir/file3.chk >> $seqres.full
_scratch_cycle_mount
echo "Compare files"
echo "after reflink" >> $seqres.full
-$FILEFRAG_PROG -v $testdir/file2 >> $seqres.full
-$FILEFRAG_PROG -v $testdir/file3 >> $seqres.full
+$FILEFRAG_PROG -v $testdir/file2 >> $seqres.full 2>&1
+$FILEFRAG_PROG -v $testdir/file3 >> $seqres.full 2>&1
md5sum $testdir/file1 | _filter_scratch
md5sum $testdir/file2 | _filter_scratch
md5sum $testdir/file3 | _filter_scratch
# now reflink the rainbow
echo "before reflink" >> $seqres.full
-$FILEFRAG_PROG -v $testdir/file2 >> $seqres.full
-$FILEFRAG_PROG -v $testdir/file3 >> $seqres.full
+$FILEFRAG_PROG -v $testdir/file2 >> $seqres.full 2>&1
+$FILEFRAG_PROG -v $testdir/file3 >> $seqres.full 2>&1
$XFS_IO_PROG -f -c "reflink $testdir/file3 $roff $roff $rsz" $testdir/file2 >> $seqres.full
cp $testdir/file3.chk $testdir/file2.chk
_pwrite_byte 0x64 0 $roff $testdir/file2.chk >> $seqres.full
echo "Compare files"
echo "after reflink" >> $seqres.full
-$FILEFRAG_PROG -v $testdir/file2 >> $seqres.full
-$FILEFRAG_PROG -v $testdir/file3 >> $seqres.full
+$FILEFRAG_PROG -v $testdir/file2 >> $seqres.full 2>&1
+$FILEFRAG_PROG -v $testdir/file3 >> $seqres.full 2>&1
md5sum $testdir/file1 | _filter_scratch
md5sum $testdir/file2 | _filter_scratch
md5sum $testdir/file2.chk | _filter_scratch
# now reflink into the rainbow
echo "before reflink" >> $seqres.full
-$FILEFRAG_PROG -v $testdir/file2 >> $seqres.full
-$FILEFRAG_PROG -v $testdir/file3 >> $seqres.full
+$FILEFRAG_PROG -v $testdir/file2 >> $seqres.full 2>&1
+$FILEFRAG_PROG -v $testdir/file3 >> $seqres.full 2>&1
$XFS_IO_PROG -f -c "reflink $testdir/file2 $soff $doff $rsz" $testdir/file3 >> $seqres.full
_pwrite_byte 0x64 $doff $rsz $testdir/file3.chk >> $seqres.full
_scratch_cycle_mount
echo "Compare files"
echo "after reflink" >> $seqres.full
-$FILEFRAG_PROG -v $testdir/file2 >> $seqres.full
-$FILEFRAG_PROG -v $testdir/file3 >> $seqres.full
+$FILEFRAG_PROG -v $testdir/file2 >> $seqres.full 2>&1
+$FILEFRAG_PROG -v $testdir/file3 >> $seqres.full 2>&1
md5sum $testdir/file1 | _filter_scratch
md5sum $testdir/file2 | _filter_scratch
md5sum $testdir/file3 | _filter_scratch
# now reflink the rainbow
echo "before reflink" >> $seqres.full
-$FILEFRAG_PROG -v $testdir/file2 >> $seqres.full
-$FILEFRAG_PROG -v $testdir/file3 >> $seqres.full
+$FILEFRAG_PROG -v $testdir/file2 >> $seqres.full 2>&1
+$FILEFRAG_PROG -v $testdir/file3 >> $seqres.full 2>&1
$XFS_IO_PROG -f -c "reflink $testdir/file3 $soff $doff $rsz" $testdir/file2 >> $seqres.full
$XFS_IO_PROG -c "truncate $doff" $testdir/file2.chk
dd if=$testdir/file3.chk skip=$((soff / blksz)) count=$((rsz / blksz)) bs=$blksz >> $testdir/file2.chk 2> /dev/null
echo "Compare files"
echo "after reflink" >> $seqres.full
-$FILEFRAG_PROG -v $testdir/file2 >> $seqres.full
-$FILEFRAG_PROG -v $testdir/file3 >> $seqres.full
+$FILEFRAG_PROG -v $testdir/file2 >> $seqres.full 2>&1
+$FILEFRAG_PROG -v $testdir/file3 >> $seqres.full 2>&1
md5sum $testdir/file1 | _filter_scratch
md5sum $testdir/file2 | _filter_scratch
md5sum $testdir/file2.chk | _filter_scratch