2 # CephFS specific common functions.
5 # _ceph_create_file_layout <filename> <stripe unit> <stripe count> <object size>
6 # This function creates a new empty file and sets the file layout according to
7 # parameters. It will exit if the file already exists.
8 _ceph_create_file_layout()
15 if [ -e $fname ]; then
16 echo "File $fname already exists."
20 $SETFATTR_PROG -n ceph.file.layout \
21 -v "stripe_unit=$objsz stripe_count=1 object_size=$objsz" \
25 # this test requires to access file capabilities through vxattr 'ceph.caps'.
26 _require_ceph_vxattr_caps()
28 $GETFATTR_PROG -n "ceph.caps" $TEST_DIR >/dev/null 2>&1 \
29 || _notrun "ceph.caps vxattr not supported"