xfs/139: work with 64k block size

For 64k block size, the agsize provided in the test causes mkfs.xfs to
fail due to insufficient log space. Hence this commit computes agsize
based on block size of the filesystem.

Signed-off-by: Chandan Rajendra <chandan@linux.vnet.ibm.com>
Tested-by: Zorro Lang <zlang@redhat.com>
Signed-off-by: Eryu Guan <guaneryu@gmail.com>
This commit is contained in:
Chandan Rajendra
2018-09-24 20:49:28 +05:30
committed by Eryu Guan
parent d06c2700b2
commit 0e2b99951f
2 changed files with 15 additions and 8 deletions
+9 -6
View File
@@ -34,17 +34,20 @@ _require_cp_reflink
rm -f $seqres.full rm -f $seqres.full
_scratch_mkfs >/dev/null 2>&1
_scratch_mount
blksz=$(_get_file_block_size $SCRATCH_MNT)
_scratch_unmount
echo "Format and mount" echo "Format and mount"
_scratch_mkfs -d agsize=$((32 * 1048576)) > $seqres.full 2>&1 _scratch_mkfs -d agsize=$((8192 * $blksz)) > $seqres.full 2>&1
_scratch_mount >> $seqres.full 2>&1 _scratch_mount >> $seqres.full 2>&1
testdir=$SCRATCH_MNT/test-$seq testdir=$SCRATCH_MNT/test-$seq
mkdir $testdir mkdir $testdir
blksz="$(_get_block_size $testdir)"
echo "Create the original files" echo "Create the original files"
sz=$((48 * 1048576)) sz=$((12288 * $blksz))
nr=$((sz / blksz))
_pwrite_byte 0x61 0 $sz $testdir/file1 >> $seqres.full _pwrite_byte 0x61 0 $sz $testdir/file1 >> $seqres.full
_cp_reflink $testdir/file1 $testdir/file2 >> $seqres.full _cp_reflink $testdir/file1 $testdir/file2 >> $seqres.full
_scratch_cycle_mount _scratch_cycle_mount
@@ -54,8 +57,8 @@ _pwrite_byte 0x62 0 $sz $testdir/file1 >> $seqres.full
_scratch_cycle_mount _scratch_cycle_mount
echo "Compare files" echo "Compare files"
md5sum $testdir/file1 | _filter_scratch od -t x1 $testdir/file1 | _filter_od
md5sum $testdir/file2 | _filter_scratch od -t x1 $testdir/file2 | _filter_od
#filefrag -v $testdir/file1 $testdir/file2 #filefrag -v $testdir/file1 $testdir/file2
# success, all done # success, all done
+6 -2
View File
@@ -3,5 +3,9 @@ Format and mount
Create the original files Create the original files
CoW every other block CoW every other block
Compare files Compare files
673c759fb131ccf3336c4f8c549a497e SCRATCH_MNT/test-139/file1 0 62 62 62 62 62 62 62 62 62 62 62 62 62 62 62 62
dc802351f6717547cbf4c951b294f952 SCRATCH_MNT/test-139/file2 *
30000
0 61 61 61 61 61 61 61 61 61 61 61 61 61 61 61 61
*
30000