Whamcloud - gitweb
b=20953 a fix for test_30 of sanity-quota
authorAndrew Perepechko <Andrew.Perepechko@Sun.COM>
Wed, 7 Apr 2010 17:43:53 +0000 (21:43 +0400)
committerJohann Lombardi <johann@sun.com>
Fri, 9 Apr 2010 09:40:08 +0000 (11:40 +0200)
lfs calculates time left to the end of a grace period based
on current client's time and MDS-based grace period end which
can lead to cetain anomalies in lfs output when the client's
clock and the MDS' clock are not synchronized. This patch
introduces some additional I/O so that grace time decisions
and calculations will only be made on the MDS side.

i=Elena Gryaznova

lustre/tests/sanity-quota.sh

index 8b004b2..ee4966a 100644 (file)
@@ -2129,11 +2129,10 @@ test_30()
         $LFS setquota -u $TSTUSR -b $LIMIT -B 0 -i 0 -I 0 $DIR
         $RUNAS dd if=/dev/zero of=$TESTFILE bs=1024 count=$((LIMIT * 2)) || true
         cancel_lru_locks osc
-        sleep 5
+        sleep $GRACE
         $LFS setquota -u $TSTUSR -B 0 $DIR
         $SHOW_QUOTA_USER
-        output=`$SHOW_QUOTA_USER | grep $MOUNT | awk '{ print $5 }' | tr -d s`
-        [ "$output" -le "$((GRACE - 5))" ] || error "grace times were reset or unexpectedly high latency"
+        $RUNAS dd if=/dev/zero of=$TESTFILE oflag=append bs=1024 count=1 && error "grace times were reset"
         rm -f $TESTFILE
         resetquota -u $TSTUSR
         $LFS setquota -t -u --block-grace $MAX_DQ_TIME --inode-grace $MAX_IQ_TIME $DIR