mirror of
https://github.com/linux-apfs/apfstests.git
synced 2026-05-01 15:01:44 -07:00
445cbd798b
For the moment cross quota realms renames has been disabled in CephFS after a bug has been found while renaming files created and truncated. This allowed clients to easily circumvent quotas. Link: https://tracker.ceph.com/issues/48203 Signed-off-by: Luis Henriques <lhenriques@suse.de> Reviewed-by: Jeff Layton <jlayton@kernel.org> Signed-off-by: Eryu Guan <guaneryu@gmail.com>
31 lines
782 B
Plaintext
31 lines
782 B
Plaintext
#
|
|
# CephFS specific common functions.
|
|
#
|
|
|
|
# _ceph_create_file_layout <filename> <stripe unit> <stripe count> <object size>
|
|
# This function creates a new empty file and sets the file layout according to
|
|
# parameters. It will exit if the file already exists.
|
|
_ceph_create_file_layout()
|
|
{
|
|
local fname=$1
|
|
local stripe_unit=$2
|
|
local stripe_count=$3
|
|
local obj_size=$4
|
|
|
|
if [ -e $fname ]; then
|
|
echo "File $fname already exists."
|
|
exit 1
|
|
fi
|
|
touch $fname
|
|
$SETFATTR_PROG -n ceph.file.layout \
|
|
-v "stripe_unit=$objsz stripe_count=1 object_size=$objsz" \
|
|
$fname
|
|
}
|
|
|
|
# this test requires to access file capabilities through vxattr 'ceph.caps'.
|
|
_require_ceph_vxattr_caps()
|
|
{
|
|
$GETFATTR_PROG -n "ceph.caps" $TEST_DIR >/dev/null 2>&1 \
|
|
|| _notrun "ceph.caps vxattr not supported"
|
|
}
|