run_test 185 "Volatile file support"
test_187a() {
+ remote_mds_nodsh && skip "remote MDS with nodsh" && return
+ [ $(lustre_version_code $SINGLEMDS) -lt $(version_code 2.3.0) ] &&
+ skip "Need MDS version at least 2.3.0" && return
+
local dir0=$DIR/$tdir/$testnum
mkdir -p $dir0 || error "creating dir $dir0"
run_test 187a "Test data version change"
test_187b() {
+ remote_mds_nodsh && skip "remote MDS with nodsh" && return
+ [ $(lustre_version_code $SINGLEMDS) -lt $(version_code 2.3.0) ] &&
+ skip "Need MDS version at least 2.3.0" && return
+
local dir0=$DIR/$tdir/$testnum
mkdir -p $dir0 || error "creating dir $dir0"
}
run_test 300k "test large striped directory"
+test_300l() {
+ [ $PARALLEL == "yes" ] && skip "skip parallel run" && return
+ [ $MDSCOUNT -lt 2 ] && skip "needs >= 2 MDTs" && return
+ local stripe_index
+
+ test_mkdir -p $DIR/$tdir/striped_dir
+ chown $RUNAS_ID $DIR/$tdir/striped_dir ||
+ error "chown $RUNAS_ID failed"
+ $LFS setdirstripe -i 1 -D $DIR/$tdir/striped_dir ||
+ error "set default striped dir failed"
+
+ #define OBD_FAIL_MDS_STALE_DIR_LAYOUT 0x158
+ $LCTL set_param fail_loc=0x80000158
+ $RUNAS mkdir $DIR/$tdir/striped_dir/test_dir || error "create dir fails"
+
+ stripe_index=$($LFS getdirstripe -i $DIR/$tdir/striped_dir/test_dir)
+ [ $stripe_index -eq 1 ] ||
+ error "expect 1 get $stripe_index for $dir"
+}
+run_test 300l "non-root user to create dir under striped dir with stale layout"
+
prepare_remote_file() {
mkdir $DIR/$tdir/src_dir ||
error "create remote source failed"