ceph/qa/workunits/rbd/krbd_stable_pages_required.sh
Ilya Dryomov 7c8a7f52da qa: krbd write-after-checksum tests
Signed-off-by: Ilya Dryomov <idryomov@gmail.com>
2017-04-27 16:28:08 +02:00

18 lines
403 B
Bash
Executable File

#!/bin/bash
set -ex
IMAGE_NAME="stable-pages-required-test"
rbd create --size 1 $IMAGE_NAME
DEV=$(sudo rbd map $IMAGE_NAME)
[[ $(blockdev --getsize64 $DEV) -eq 1048576 ]]
grep -q 1 /sys/block/${DEV#/dev/}/bdi/stable_pages_required
rbd resize --size 2 $IMAGE_NAME
[[ $(blockdev --getsize64 $DEV) -eq 2097152 ]]
grep -q 1 /sys/block/${DEV#/dev/}/bdi/stable_pages_required
sudo rbd unmap $DEV
echo OK