mirror of
https://github.com/linux-apfs/apfstests.git
synced 2026-05-01 15:01:44 -07:00
ceph: add copy_file_range (remote copy operation) testing
Test remote copy operation (CEPH_OSD_OP_COPY_FROM) with different combinations of both object sizes and copy sizes. Test remote copy operation (CEPH_OSD_OP_COPY_FROM) with several combinations of both object sizes and copy sizes. It also uses several combinations of copy ranges. For example, copying the 1st object in the src file into: 1) the beginning (1st object) of dst file, 2) the end (last object) of dst file and 3) the middle of the dst file. Signed-off-by: Luis Henriques <lhenriques@suse.com> Reviewed-by: Eryu Guan <guaneryu@gmail.com> Signed-off-by: Eryu Guan <guaneryu@gmail.com>
This commit is contained in:
committed by
Eryu Guan
parent
f81829d98c
commit
10f3f9707c
+23
@@ -0,0 +1,23 @@
|
||||
#
|
||||
# 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
|
||||
}
|
||||
Reference in New Issue
Block a user