Whamcloud - gitweb
LU-5093 test: dir_remote.sh change stripe count 90/10390/5
authorPatrick Farrell <paf@cray.com>
Mon, 2 Jun 2014 15:24:03 +0000 (10:24 -0500)
committerOleg Drokin <oleg.drokin@intel.com>
Wed, 4 Jun 2014 14:34:45 +0000 (14:34 +0000)
dir_remote.sh currently creates only directories with
$MDTCOUNT stripes. This patch makes it create directories
with from 1 to $MDTCOUNT stripes, which also creates
non-striped remote directories (stripe_count = 1).

Signed-off-by: Patrick Farrell <paf@cray.com>
Change-Id: I8334661b40620c1e0ecc03dd29756fb607e3e3ca
Reviewed-on: http://review.whamcloud.com/10390
Tested-by: Jenkins
Tested-by: Maloo <hpdd-maloo@intel.com>
Reviewed-by: Andreas Dilger <andreas.dilger@intel.com>
Reviewed-by: John L. Hammond <john.hammond@intel.com>
lustre/tests/racer/dir_remote.sh

index 77f9e58..1bc9c3a 100755 (executable)
@@ -8,8 +8,11 @@ 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$MDTCOUNT $DIR/$remote_dir 2> /dev/null
+       $LFS mkdir -i$mdt_idx -c$stripe_count $DIR/$remote_dir 2> /dev/null
        touch $DIR/$remote_dir/$file 2> /dev/null
        $LFS getdirstripe $DIR/$remote_dir > /dev/null 2>&1
 done