2 # SPDX-License-Identifier: GPL-2.0
3 # Copyright (c) 2009 Christoph Hellwig.
7 # Test out the xfs_repair -o force_geometry option on single-AG filesystems.
10 seqres=$RESULT_DIR/$seq
11 echo "QA output created by $seq"
15 status=1 # failure is the default!
17 # get standard environment, filters and checks
22 # real QA test starts here
25 # single AG will cause default xfs_repair to fail. This test is actually
26 # testing the special corner case option needed to repair a single AG fs.
27 _require_scratch_nocheck
30 # The AG size is limited to 1TB (or even less with historic xfsprogs),
31 # so chose a small enough filesystem to make sure we can actually create
32 # a single AG filesystem.
34 echo "== Creating single-AG filesystem =="
35 _scratch_mkfs_xfs -d agcount=1 -d size=$((1024*1024*1024)) >/dev/null 2>&1 \
36 || _fail "!!! failed to make filesystem with single AG"
38 echo "== Trying to repair it (should fail) =="
41 echo "== Trying to repair it with -o force_geometry =="
42 _scratch_xfs_repair -o force_geometry 2>&1 | _filter_repair