+rm -f $OOS $LOG
+
+sync; sleep 1; sync # to ensure we get up-to-date statfs info
+
+#$LCTL set_param -n debug=-1
+#$LCTL set_param -n subsystem_debug=0x40a8
+
+#$LCTL clear
+#$LCTL debug_daemon start /r/tmp/debug 1024
+
+STRIPECOUNT=`$LCTL get_param -n lov.*.activeobd | head -n 1`
+ORIGFREE=`$LCTL get_param -n llite.*.kbytesavail | head -n 1`
+MAXFREE=${MAXFREE:-$((400000 * $STRIPECOUNT))}
+echo STRIPECOUNT=$STRIPECOUNT ORIGFREE=$ORIGFREE MAXFREE=$MAXFREE
+if [ $ORIGFREE -gt $MAXFREE ]; then
+ skip "$0: ${ORIGFREE}kB free gt MAXFREE ${MAXFREE}kB, increase $MAXFREE (or reduce test fs size) to proceed"
+ exit 0
+fi
+
+export LANG=C LC_LANG=C # for "No space left on device" message