Files
apfstests/tests/btrfs/182
T
Darrick J. Wong 7e98d41a6e fstests: move test group info to test files
Refactor every test in the entire test suite to use the new boilerplate
functions.  This also migrates all the test group information into the
test files.  This patch has been autogenerated via the command:

./tools/convert-group btrfs ceph cifs ext4 f2fs generic nfs ocfs2 overlay perf shared udf xfs

Signed-off-by: Darrick J. Wong <djwong@kernel.org>
Reviewed-by: Allison Henderson <allison.henderson@oracle.com>
Reviewed-by: Eric Biggers <ebiggers@google.com>
Signed-off-by: Eryu Guan <guaneryu@gmail.com>
2021-06-27 22:50:02 +08:00

45 lines
1.0 KiB
Bash
Executable File

#! /bin/bash
# SPDX-License-Identifier: GPL-2.0
# Copyright (C) 2019 SUSE Linux Products GmbH. All Rights Reserved.
#
# FS QA Test 182
#
# Test if balance will report false ENOSPC error
#
# This is a long existing bug, caused by over-estimated metadata
# space_info::bytes_may_use.
#
# There is one proposed patch for btrfs-progs to fix it, titled:
# "btrfs-progs: balance: Sync the fs before balancing metadata chunks"
#
. ./common/preamble
_begin_fstest auto quick balance
# Import common functions.
. ./common/filter
# real QA test starts here
# Modify as appropriate.
_supported_fs btrfs
_require_scratch
nr_files=1024
_scratch_mkfs > /dev/null
_scratch_mount
$BTRFS_UTIL_PROG subvolume create "$SCRATCH_MNT/subvol" > /dev/null
# Create some small files to take up enough metadata reserved space
for ((i = 0; i < $nr_files; i++)) do
_pwrite_byte 0xcd 0 1K "$SCRATCH_MNT/subvol/file_$i" > /dev/null
done
_run_btrfs_balance_start -m $SCRATCH_MNT >> $seqres.full
# success, all done
echo "Silence is golden"
status=0
exit