summaryrefslogtreecommitdiffstats
path: root/qa/workunits/rbd/map-snapshot-io.sh
blob: a69d8482982b580289eb68c3277d808bdaa92443 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
#!/bin/sh

# http://tracker.ceph.com/issues/3964

set -ex

rbd create image -s 100
DEV=$(sudo rbd map image)
dd if=/dev/zero of=$DEV oflag=direct count=10
rbd snap create image@s1
dd if=/dev/zero of=$DEV oflag=direct count=10   # used to fail
rbd snap rm image@s1
dd if=/dev/zero of=$DEV oflag=direct count=10
sudo rbd unmap $DEV
rbd rm image

echo OK