mirror of
https://github.com/linux-apfs/apfstests.git
synced 2026-05-01 15:01:44 -07:00
7e98d41a6e
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>
46 lines
1.1 KiB
Bash
Executable File
46 lines
1.1 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 180
|
|
#
|
|
# Test if btrfs hits EDQUOT without reclaiming already freed extents when quota
|
|
# is enabled.
|
|
#
|
|
# This bug is going to be fxied by a patch for kernel titled
|
|
# "btrfs: qgroup: Make qgroup async transaction commit more aggressive"
|
|
#
|
|
. ./common/preamble
|
|
_begin_fstest auto quick qgroup limit
|
|
|
|
# Import common functions.
|
|
. ./common/filter
|
|
|
|
# real QA test starts here
|
|
|
|
# Modify as appropriate.
|
|
_supported_fs btrfs
|
|
_require_scratch
|
|
_require_xfs_io_command falloc
|
|
|
|
_scratch_mkfs > /dev/null
|
|
_scratch_mount
|
|
|
|
$BTRFS_UTIL_PROG quota enable "$SCRATCH_MNT" > /dev/null
|
|
$BTRFS_UTIL_PROG quota rescan -w "$SCRATCH_MNT" > /dev/null
|
|
$BTRFS_UTIL_PROG qgroup limit -e 1G "$SCRATCH_MNT"
|
|
|
|
$XFS_IO_PROG -f -c "falloc 0 900M" "$SCRATCH_MNT/padding"
|
|
|
|
# Commit transaction to reflect the quota usage
|
|
sync
|
|
|
|
rm -f "$SCRATCH_MNT/padding"
|
|
|
|
# Without the kernel fix, this will trigger EDQUOT.
|
|
_pwrite_byte 0xcd 0 512M "$SCRATCH_MNT/real_file" | _filter_xfs_io
|
|
|
|
# success, all done
|
|
status=0
|
|
exit
|