- $LFS setquota -u $RUNAS_ID -b $LIMIT -B $LIMIT $dir
- sleep 3
- $LFS quota -v -u $RUNAS_ID $dir
-
- $SETSTRIPE -c 1 -p $POOL $file
- chown $RUNAS_ID.$RUNAS_GID $file
- ls -l $file
-
- # This does two "dd" runs to ensure that the quota failure is returned
- # to userspace when we check. The first "dd" might otherwise complete
- # without error if it is only writing into cache.
- stat=$(LOCALE=C $RUNAS dd if=/dev/zero of=$file bs=$BUNIT_SZ \
- count=$((BUNIT_SZ*2)) 2>&1)
- echo $stat | grep "Disk quota exceeded" > /dev/null
- if [ $? -eq 0 ]; then
- $LFS quota -v -u $RUNAS_ID $dir
- cancel_lru_locks osc
- stat=$(LOCALE=C $RUNAS dd if=/dev/zero of=$file bs=$BUNIT_SZ \
- count=$BUNIT_SZ seek=$((BUNIT_SZ*2)) 2>&1)
- RC=$?
- echo $stat
- [[ $RC -eq 0 ]] && error "second dd did not fail."
- echo $stat | grep "Disk quota exceeded" > /dev/null
- [[ $? -eq 1 ]] && error "second dd did not fail with EDQUOT."
- else
- log "first dd failed with EDQUOT."
- fi
- $LFS quota -v -u $RUNAS_ID $dir
+ $LFS setquota -u $RUNAS_ID -b $LIMIT -B $LIMIT $dir
+ sleep 3
+ $LFS quota -v -u $RUNAS_ID $dir
+
+ $SETSTRIPE -c 1 -p $POOL $file
+ chown $RUNAS_ID.$RUNAS_GID $file
+ ls -l $file
+
+ # This does two "dd" runs to ensure that the quota failure is returned
+ # to userspace when we check. The first "dd" might otherwise complete
+ # without error if it is only writing into cache.
+ stat=$(LOCALE=C $RUNAS dd if=/dev/zero of=$file bs=$BUNIT_SZ \
+ count=$((BUNIT_SZ*2)) 2>&1)
+ echo $stat | grep "Disk quota exceeded" > /dev/null
+ if [ $? -eq 0 ]; then
+ $LFS quota -v -u $RUNAS_ID $dir
+ cancel_lru_locks osc
+ stat=$(LOCALE=C $RUNAS dd if=/dev/zero of=$file bs=$BUNIT_SZ \
+ count=$BUNIT_SZ seek=$((BUNIT_SZ*2)) 2>&1)
+ RC=$?
+ echo $stat
+ [[ $RC -eq 0 ]] && error "second dd did not fail."
+ echo $stat | grep "Disk quota exceeded" > /dev/null
+ [[ $? -eq 1 ]] && error "second dd did not fail with EDQUOT."
+ else
+ log "first dd failed with EDQUOT."
+ fi
+ $LFS quota -v -u $RUNAS_ID $dir