Whamcloud - gitweb
Branch b1_8
authorfanyong <fanyong>
Tue, 20 Jan 2009 01:38:17 +0000 (01:38 +0000)
committerfanyong <fanyong>
Tue, 20 Jan 2009 01:38:17 +0000 (01:38 +0000)
b=18182
i=tianzy
i=panda

Set stripe count as 1 and stripte index as 0 to make sure the file is created on first ost.

lustre/tests/sanity-quota.sh

index f43afe8..58ddd54 100644 (file)
@@ -1856,24 +1856,25 @@ test_25_sub() {
        chmod 0777 $DIR/$tdir
        TESTFILE="$DIR/$tdir/$tfile-0"
        rm -f $TESTFILE
+       LIMIT=$(( $BUNIT_SZ * ($OSTCOUNT + 1) + 4096 ))
 
        wait_delete_completed
 
         # set quota for $TSTUSR
         log "setquota for $TSTUSR"
-       $LFS setquota $1 $TSTUSR -b 10240 -B 10240 -i 10 -I 10 $DIR
+       $LFS setquota $1 $TSTUSR -b $LIMIT -B $LIMIT -i 10 -I 10 $DIR
        sleep 3
         show_quota $1 $TSTUSR
 
         # set quota for $TSTUSR2
         log "setquota for $TSTUSR2"
-       $LFS setquota $1 $TSTUSR2 -b 10240 -B 10240 -i 10 -I 10 $DIR
+       $LFS setquota $1 $TSTUSR2 -b $LIMIT -B $LIMIT -i 10 -I 10 $DIR
        sleep 3
         show_quota $1 $TSTUSR2
 
         # set stripe index to 0
         log "setstripe for $DIR/$tdir to 0"
-       $LFS setstripe $DIR/$tdir -i 0
+       $LFS setstripe $DIR/$tdir -c 1 -i 0
        MDS_UUID=`do_facet mds $LCTL dl | grep -m1 mds | awk '{print $((NF-1))}'`
        OST0_UUID=`do_facet ost1 $LCTL dl | grep -m1 obdfilter | awk '{print $((NF-1))}'`
        MDS_QUOTA_USED_OLD=`$LFS quota -o $MDS_UUID $1 $TSTUSR $DIR | awk '/^.*[[:digit:]+][[:space:]+]/ { print $4 }'`