Whamcloud - gitweb
LU-8739 test: disable DNE in racer for old MDSs
[fs/lustre-release.git] / lustre / tests / racer / dir_remote.sh
index 0950625..5e6f197 100755 (executable)
@@ -9,11 +9,16 @@ while /bin/true ; do
        remote_dir=$((RANDOM % MAX))
        file=$((RANDOM % MAX))
        mdt_idx=$((RANDOM % MDTCOUNT))
-       # stripe_count in range [1,MDTCOUNT]
-       # $LFS mkdir treats stripe_count 0 and 1 the same
-       stripe_count=$(((RANDOM % MDTCOUNT) + 1))
-       mkdir -p $DIR 2> /dev/null
-       $LFS mkdir -i$mdt_idx -c$stripe_count $DIR/$remote_dir 2> /dev/null
+
+       if $RACER_ENABLE_STRIPED_DIRS; then
+               # stripe_count in range [1,MDTCOUNT]
+               # $LFS mkdir treats stripe_count 0 and 1 the same
+               stripe_count_opt="-c$((RANDOM % MDTCOUNT + 1))"
+       else
+               stripe_count_opt=""
+       fi
+
+       $LFS mkdir -i$mdt_idx $stripe_count_opt $DIR/$remote_dir 2> /dev/null
        touch $DIR/$remote_dir/$file 2> /dev/null
        $LFS getdirstripe $DIR/$remote_dir > /dev/null 2>&1
 done