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 00000000000..a7286982409 --- /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 00000000000..05fc8a98c64 --- /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 <