From: Ilya Dryomov Date: Tue, 30 May 2017 14:17:21 +0000 (+0200) Subject: qa: krbd discard/zeroout tests X-Git-Tag: v12.1.0~256^2~1^2 X-Git-Url: http://git-server-git.apps.pok.os.sepia.ceph.com/?a=commitdiff_plain;h=156cf45214472777309cea92c79590e294ebfef9;p=ceph.git qa: krbd discard/zeroout tests Signed-off-by: Ilya Dryomov --- diff --git a/qa/suites/krbd/rbd-nomount/tasks/krbd_fallocate.yaml b/qa/suites/krbd/rbd-nomount/tasks/krbd_fallocate.yaml new file mode 100644 index 000000000000..a7286982409b --- /dev/null +++ b/qa/suites/krbd/rbd-nomount/tasks/krbd_fallocate.yaml @@ -0,0 +1,5 @@ +tasks: +- workunit: + clients: + all: + - rbd/krbd_fallocate.sh diff --git a/qa/workunits/rbd/krbd_fallocate.sh b/qa/workunits/rbd/krbd_fallocate.sh new file mode 100755 index 000000000000..05fc8a98c640 --- /dev/null +++ b/qa/workunits/rbd/krbd_fallocate.sh @@ -0,0 +1,124 @@ +#!/bin/bash + +# This documents the state of things as of 4.12-rc4. +# +# - fallocate -z deallocates because BLKDEV_ZERO_NOUNMAP hint is ignored by +# krbd +# +# - unaligned fallocate -z/-p appear to not deallocate -- see caveat #2 in +# linux.git commit 6ac56951dc10 ("rbd: implement REQ_OP_WRITE_ZEROES") + +set -ex + +# no blkdiscard(8) in trusty +function py_blkdiscard() { + local offset=$1 + + python <