mirror of
https://github.com/linux-apfs/apfstests.git
synced 2026-05-01 15:01:44 -07:00
xfs/310: fix the size calculation for the huge device
Fix the calculation of the dmhuge size. The previous calculation tried to calculate the size correctly, but got it wrong for 1k block sizes. Therefore, clean the whole mess up. Signed-off-by: Darrick J. Wong <darrick.wong@oracle.com> Reviewed-by: Christoph Hellwig <hch@lst.de> Signed-off-by: Eryu Guan <eguan@redhat.com>
This commit is contained in:
committed by
Eryu Guan
parent
946b199460
commit
1496a4f5e9
+3
-2
@@ -63,7 +63,9 @@ blksz="$(stat -f $SCRATCH_MNT -c '%S')"
|
||||
umount $SCRATCH_MNT
|
||||
|
||||
echo "Format huge device"
|
||||
_dmhugedisk_init $((blksz * 2 * 4400)) # a little over 2^22 blocks
|
||||
nr_blks=2100000 # 2^21 plus a little more
|
||||
sectors=$(( (nr_blks * 3) * blksz / 512 )) # each AG must have > 2^21 blocks
|
||||
_dmhugedisk_init $sectors
|
||||
_mkfs_dev -d agcount=2 $DMHUGEDISK_DEV
|
||||
_mount $DMHUGEDISK_DEV $SCRATCH_MNT
|
||||
xfs_info $SCRATCH_MNT >> $seqres.full
|
||||
@@ -71,7 +73,6 @@ xfs_info $SCRATCH_MNT >> $seqres.full
|
||||
echo "Create the original file blocks"
|
||||
mkdir $testdir
|
||||
blksz="$(stat -f $testdir -c '%S')"
|
||||
nr_blks=2100000 # 2^21 plus a little more
|
||||
$XFS_IO_PROG -f -c "falloc 0 $((nr_blks * blksz))" $testdir/file1 >> $seqres.full
|
||||
|
||||
echo "Check extent count"
|
||||
|
||||
Reference in New Issue
Block a user