Skip to content
Snippets Groups Projects
Commit 9eb89850 authored by Zach Brown's avatar Zach Brown
Browse files

- add an overwrite pass

- clean up output directory creation
parent d669177c
No related merge requests found
...@@ -226,7 +226,7 @@ sgp_dd_start() { ...@@ -226,7 +226,7 @@ sgp_dd_start() {
local bdev=${blocks[$i]}; local bdev=${blocks[$i]};
case "$wor" in case "$wor" in
w) ifof="if=/dev/zero of=$bdev" ;; [wo]) ifof="if=/dev/zero of=$bdev" ;;
r) ifof="if=$bdev of=/dev/null" ;; r) ifof="if=$bdev of=/dev/null" ;;
*) die "asked to do io with $wor?" *) die "asked to do io with $wor?"
esac esac
...@@ -302,7 +302,7 @@ ext2_iozone_setup() { ...@@ -302,7 +302,7 @@ ext2_iozone_setup() {
case "$wor" in case "$wor" in
w) rm -f $f ;; w) rm -f $f ;;
r) ;; [or]) ;;
*) die "asked to do io with $wor?" *) die "asked to do io with $wor?"
esac esac
} }
...@@ -315,7 +315,7 @@ ext2_iozone_start() { ...@@ -315,7 +315,7 @@ ext2_iozone_start() {
local f="$tmpdir/mount_$id/iozone" local f="$tmpdir/mount_$id/iozone"
case "$wor" in case "$wor" in
w) args="-i 0 -w" ;; [wo]) args="-i 0 -w" ;;
r) args="-i 1" ;; r) args="-i 1" ;;
*) die "asked to do io with $wor?" *) die "asked to do io with $wor?"
esac esac
...@@ -330,7 +330,7 @@ ext2_iozone_result() { ...@@ -330,7 +330,7 @@ ext2_iozone_result() {
local field local field
case "$wor" in case "$wor" in
w) string="writers" [wo]) string="writers"
field=7 field=7
;; ;;
r) string="readers" r) string="readers"
...@@ -489,7 +489,7 @@ echo_filter_setup() { ...@@ -489,7 +489,7 @@ echo_filter_setup() {
case "$wor" in case "$wor" in
w) ;; w) ;;
r) return ;; [or]) return ;;
*) die "asked to do io with $wor?" *) die "asked to do io with $wor?"
esac esac
...@@ -504,19 +504,20 @@ echo_filter_start() { ...@@ -504,19 +504,20 @@ echo_filter_start() {
local iosize=$2 local iosize=$2
local wor=$3 local wor=$3
local id=$4 local id=$4
local rw
local name="echo_$id" local name="echo_$id"
local len_pages=$(($io_len / $(($page_size / 1024)) / $threads )) local len_pages=$(($io_len / $(($page_size / 1024)) / $threads ))
local size_pages=$(($iosize / $(($page_size / 1024)) )) local size_pages=$(($iosize / $(($page_size / 1024)) ))
case "$wor" in case "$wor" in
w) ;; [wo]) rw="w" ;;
r) ;; r) rw="r" ;;
*) die "asked to do io with $wor?" *) die "asked to do io with $wor?"
esac esac
echo lctl --threads $threads v "\$"$name \ echo lctl --threads $threads v "\$"$name \
test_brw 1 $wor v $len_pages t${running_oids[$id]} p$size_pages test_brw 1 $rw v $len_pages t${running_oids[$id]} p$size_pages
} }
echo_filter_result() { echo_filter_result() {
local output=$1 local output=$1
...@@ -535,7 +536,7 @@ echo_filter_cleanup() { ...@@ -535,7 +536,7 @@ echo_filter_cleanup() {
local name="echo_$id" local name="echo_$id"
case "$wor" in case "$wor" in
w) return ;; [wo]) return ;;
r) ;; r) ;;
*) die "asked to do io with $wor?" *) die "asked to do io with $wor?"
esac esac
...@@ -721,7 +722,7 @@ test_iterator() { ...@@ -721,7 +722,7 @@ test_iterator() {
table_set $test 0 $cur_y $thr table_set $test 0 $cur_y $thr
table_set $test 1 $cur_y $iosize table_set $test 1 $cur_y $iosize
for wor in w r; do for wor in w o r; do
table_set $test 2 $cur_y $wor table_set $test 2 $cur_y $wor
test_one $test 3 $thr $iosize $wor test_one $test 3 $thr $iosize $wor
done done
...@@ -766,8 +767,9 @@ if [ -z "$io_len" ]; then ...@@ -766,8 +767,9 @@ if [ -z "$io_len" ]; then
fi fi
if [ ! -z "$output_dir" ]; then if [ ! -z "$output_dir" ]; then
[ ! -e "$output_dir" ] && mkdir -p "$output_dir" || die \ if [ ! -e "$output_dir" ]; then
"error creating $output_dir" mkdir -p "$output_dir" || die "error creating $output_dir"
fi
[ ! -d "$output_dir" ] && die "$output_dir isn't a directory" [ ! -d "$output_dir" ] && die "$output_dir isn't a directory"
fi fi
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment