summaryrefslogtreecommitdiff
path: root/prep-benchmark-fs.sh
diff options
context:
space:
mode:
authorKent Overstreet <kent.overstreet@gmail.com>2016-12-12 12:48:39 -0900
committerKent Overstreet <kent.overstreet@gmail.com>2016-12-12 12:48:39 -0900
commited0b2e3f2b098fb75b1a012214d5472c979213f0 (patch)
tree614e0505ccd7ea9a720b882119dbdb5f961e7866 /prep-benchmark-fs.sh
parentce57f737388fc153f368a6081fd992f02a63506e (diff)
use sqlite for storing benchmark resultssqlite
Diffstat (limited to 'prep-benchmark-fs.sh')
-rwxr-xr-xprep-benchmark-fs.sh14
1 files changed, 6 insertions, 8 deletions
diff --git a/prep-benchmark-fs.sh b/prep-benchmark-fs.sh
index 3a46946..5339daf 100755
--- a/prep-benchmark-fs.sh
+++ b/prep-benchmark-fs.sh
@@ -23,17 +23,17 @@ while getopts "hd:m:f:" arg; do
esac
done
-if [[ -z $DEV ]]; then
+if [[ -z ${DEV-} ]]; then
echo "Required parameter -d missing: device to test"
exit 1
fi
-if [[ -z $MNT ]]; then
+if [[ -z ${MNT-} ]]; then
echo "Required parameter -m missing: mount point"
exit 1
fi
-if [[ -z $FS ]]; then
+if [[ -z ${FS-} ]]; then
echo "Required parameter -f missing: filesystem type"
exit 1
fi
@@ -45,13 +45,11 @@ blkdiscard -s $DEV >/dev/null 2>&1 ||
blkdiscard $DEV >/dev/null 2>&1 ||
true
+wipefs -af $DEV
+
case $FS in
bcache)
- wipefs -a $DEV
- bcache format \
- --error_action=panic \
- --data_csum_type=none \
- --cache $DEV
+ bcache format -f $DEV
;;
ext4)
mkfs.ext4 -F $DEV