summaryrefslogtreecommitdiffstats
path: root/src/ceph/qa/workunits/rbd/map-unmap.sh
diff options
context:
space:
mode:
authorQiaowei Ren <qiaowei.ren@intel.com>2018-03-01 14:38:11 +0800
committerQiaowei Ren <qiaowei.ren@intel.com>2018-03-01 14:38:11 +0800
commit7da45d65be36d36b880cc55c5036e96c24b53f00 (patch)
treed4f944eb4f8f8de50a9a7584ffa408dc3a3185b2 /src/ceph/qa/workunits/rbd/map-unmap.sh
parent691462d09d0987b47e112d6ee8740375df3c51b2 (diff)
remove ceph code
This patch removes initial ceph code, due to license issue. Change-Id: I092d44f601cdf34aed92300fe13214925563081c Signed-off-by: Qiaowei Ren <qiaowei.ren@intel.com>
Diffstat (limited to 'src/ceph/qa/workunits/rbd/map-unmap.sh')
-rwxr-xr-xsrc/ceph/qa/workunits/rbd/map-unmap.sh44
1 files changed, 0 insertions, 44 deletions
diff --git a/src/ceph/qa/workunits/rbd/map-unmap.sh b/src/ceph/qa/workunits/rbd/map-unmap.sh
deleted file mode 100755
index ce7d20f..0000000
--- a/src/ceph/qa/workunits/rbd/map-unmap.sh
+++ /dev/null
@@ -1,44 +0,0 @@
-#!/bin/bash -ex
-
-RUN_TIME=300 # approximate duration of run (seconds)
-
-[ $# -eq 1 ] && RUN_TIME="$1"
-
-IMAGE_NAME="image-$$"
-IMAGE_SIZE="1024" # MB
-
-function get_time() {
- date '+%s'
-}
-
-function times_up() {
- local end_time="$1"
-
- test $(get_time) -ge "${end_time}"
-}
-
-function map_unmap() {
- [ $# -eq 1 ] || exit 99
- local image_name="$1"
-
- local dev
- dev="$(sudo rbd map "${image_name}")"
- sudo rbd unmap "${dev}"
-}
-
-#### Start
-
-rbd create "${IMAGE_NAME}" --size="${IMAGE_SIZE}"
-
-COUNT=0
-START_TIME=$(get_time)
-END_TIME=$(expr $(get_time) + ${RUN_TIME})
-while ! times_up "${END_TIME}"; do
- map_unmap "${IMAGE_NAME}"
- COUNT=$(expr $COUNT + 1)
-done
-ELAPSED=$(expr "$(get_time)" - "${START_TIME}")
-
-rbd rm "${IMAGE_NAME}"
-
-echo "${COUNT} iterations completed in ${ELAPSED} seconds"