### Data-on-MDT sanity tests ###
test_270a() {
+
+ [ $(lustre_version_code $SINGLEMDS) -lt $(version_code 2.10.55) ] &&
+ skip "Need MDS version at least 2.10.55" && return
+
# create DoM file
local dom=$DIR/$tdir/dom_file
local tmp=$DIR/$tdir/tmp_file
run_test 270a "DoM: basic functionality tests"
test_270b() {
+ [ $(lustre_version_code $SINGLEMDS) -lt $(version_code 2.10.55) ] &&
+ skip "Need MDS version at least 2.10.55" && return
+
local dom=$DIR/$tdir/dom_file
local max_size=1048576
run_test 270b "DoM: maximum size overflow checks for DoM-only file"
test_270c() {
+ [ $(lustre_version_code $SINGLEMDS) -lt $(version_code 2.10.55) ] &&
+ skip "Need MDS version at least 2.10.55" && return
+
mkdir -p $DIR/$tdir
$LFS setstripe -E 1024K -L mdt $DIR/$tdir
run_test 270c "DoM: DoM EA inheritance tests"
test_270d() {
+ [ $(lustre_version_code $SINGLEMDS) -lt $(version_code 2.10.55) ] &&
+ skip "Need MDS version at least 2.10.55" && return
+
mkdir -p $DIR/$tdir
$LFS setstripe -E 1024K -L mdt $DIR/$tdir
run_test 270d "DoM: change striping from DoM to RAID0"
test_270e() {
+ [ $(lustre_version_code $SINGLEMDS) -lt $(version_code 2.10.55) ] &&
+ skip "Need MDS version at least 2.10.55" && return
+
mkdir -p $DIR/$tdir/dom
mkdir -p $DIR/$tdir/norm
DOMFILES=20
run_test 270e "DoM: lfs find with DoM files test"
test_270f() {
+ [ $(lustre_version_code $SINGLEMDS) -lt $(version_code 2.10.55) ] &&
+ skip "Need MDS version at least 2.10.55" && return
+
local mdtname=${FSNAME}-MDT0000-mdtlov
local dom=$DIR/$tdir/dom_file
local dom_limit_saved=$(do_facet mds1 $LCTL get_param -n \
run_test 270f "DoM: maximum DoM stripe size checks"
test_271a() {
+ [ $(lustre_version_code $SINGLEMDS) -lt $(version_code 2.10.55) ] &&
+ skip "Need MDS version at least 2.10.55" && return
+
local dom=$DIR/$tdir/dom
mkdir -p $DIR/$tdir
run_test 271a "DoM: data is cached for read after write"
test_271b() {
+ [ $(lustre_version_code $SINGLEMDS) -lt $(version_code 2.10.55) ] &&
+ skip "Need MDS version at least 2.10.55" && return
+
local dom=$DIR/$tdir/dom
mkdir -p $DIR/$tdir
run_test 271b "DoM: no glimpse RPC for stat (DoM only file)"
test_271ba() {
+ [ $(lustre_version_code $SINGLEMDS) -lt $(version_code 2.10.55) ] &&
+ skip "Need MDS version at least 2.10.55" && return
+
local dom=$DIR/$tdir/dom
mkdir -p $DIR/$tdir
# test to be enabled with lock_convert
skip "skipped until lock convert will be implemented" && return
+ [ $(lustre_version_code $SINGLEMDS) -lt $(version_code 2.10.55) ] &&
+ skip "Need MDS version at least 2.10.55" && return
+
local dom=$DIR/$tdir/dom
mkdir -p $DIR/$tdir
# Data-on-MDT tests
test_100a() {
skip "Reserved for glimpse-ahead" && return
+ [ $(lustre_version_code $SINGLEMDS) -lt $(version_code 2.10.55) ] &&
+ skip "Need MDS version at least 2.10.55" && return
+
mkdir -p $DIR/$tdir
$LFS setstripe -E 1024K -L mdt -E EOF $DIR/$tdir/dom
run_test 100a "DoM: glimpse RPCs for stat without IO lock (DoM only file)"
test_100b() {
+ [ $(lustre_version_code $SINGLEMDS) -lt $(version_code 2.10.55) ] &&
+ skip "Need MDS version at least 2.10.55" && return
+
mkdir -p $DIR/$tdir
$LFS setstripe -E 1024K -L mdt -E EOF $DIR/$tdir/dom
run_test 100b "DoM: no glimpse RPC for stat with IO lock (DoM only file)"
test_100c() {
+ [ $(lustre_version_code $SINGLEMDS) -lt $(version_code 2.10.55) ] &&
+ skip "Need MDS version at least 2.10.55" && return
+
mkdir -p $DIR/$tdir
$LFS setstripe -E 1024K -L mdt -E EOF $DIR/$tdir/dom
run_test 100c "DoM: write vs stat without IO lock (combined file)"
test_100d() {
+ [ $(lustre_version_code $SINGLEMDS) -lt $(version_code 2.10.55) ] &&
+ skip "Need MDS version at least 2.10.55" && return
+
mkdir -p $DIR/$tdir
$LFS setstripe -E 1024K -L mdt -E EOF $DIR/$tdir/dom
run_test 100d "DoM: write+truncate vs stat without IO lock (combined file)"
test_101a() {
+ [ $(lustre_version_code $SINGLEMDS) -lt $(version_code 2.10.55) ] &&
+ skip "Need MDS version at least 2.10.55" && return
+
$LFS setstripe -E 1024K -L mdt -E EOF $DIR1/$tfile
# to get layout
$CHECKSTAT -t file $DIR1/$tfile
run_test 101a "Discard DoM data on unlink"
test_101b() {
+ [ $(lustre_version_code $SINGLEMDS) -lt $(version_code 2.10.55) ] &&
+ skip "Need MDS version at least 2.10.55" && return
+
$LFS setstripe -E 1024K -L mdt -E EOF $DIR1/$tfile
touch $DIR1/${tfile}_2
# to get layout
run_test 101b "Discard DoM data on rename"
test_101c() {
+ [ $(lustre_version_code $SINGLEMDS) -lt $(version_code 2.10.55) ] &&
+ skip "Need MDS version at least 2.10.55" && return
+
$LFS setstripe -E 1024K -L mdt -E EOF $DIR1/$tfile
# to get layout
$CHECKSTAT -t file $DIR1/$tfile