2 # SPDX-License-Identifier: GPL-2.0
3 # Copyright (c) 2016, Oracle and/or its affiliates. All Rights Reserved.
7 # Tests xfs_growfs on a rmapbt filesystem
10 _begin_fstest auto quick rmap
12 # Import common functions.
15 # real QA test starts here
17 _require_xfs_scratch_rmapbt
18 _require_no_large_scratch_dev
20 echo "Format and mount"
21 _scratch_mkfs_sized $((2 * 4096 * 4096)) > $seqres.full 2>&1
22 _scratch_mount >> $seqres.full 2>&1
24 testdir=$SCRATCH_MNT/test-$seq
27 echo "Create the original files"
28 blksz="$(_get_block_size $testdir)"
29 _pwrite_byte 0x61 0 $((blksz * 14 + 71)) $testdir/original >> $seqres.full
30 cp -p $testdir/original $testdir/copy1
31 cp -p $testdir/copy1 $testdir/copy2
34 $XFS_GROWFS_PROG $SCRATCH_MNT 2>&1 | _filter_growfs >> $seqres.full
37 echo "Create more copies"
38 cp -p $testdir/original $testdir/copy3
40 $XFS_INFO_PROG $SCRATCH_MNT >> $seqres.full