- dd if=/dev/urandom of=$temp bs=$((big*2)) count=1k || \
- error "dd of=$temp bs=$((big*2)) count=1k failed"
+ rm -f $temp $file
+ true
+}
+
+test_155_big_load() {
+ local temp=$TMP/$tfile
+ local file=$DIR/$tfile
+ local list=$(comma_list $(osts_nodes))
+ local big=$(do_nodes $list grep "cache" /proc/cpuinfo | \
+ awk '{sum+=$4} END{print sum}')
+ local min_avail=$(lctl get_param -n osc.*[oO][sS][cC]-[^M]*.kbytesavail | \
+ sort -n | head -1)
+ local large_file_size=$((big * 2))
+
+ log "cache size on OSS is $big KB"
+ log "large file size is $large_file_size KB"
+ log "min available OST size is $min_avail KB"
+
+ [ $min_avail -le $large_file_size ] && \
+ skip "the minimum available OST size needs > $large_file_size KB" && \
+ return 0
+
+ dd if=/dev/urandom of=$temp bs=$large_file_size count=1k || \
+ error "dd of=$temp bs=$large_file_size count=1k failed"