From: Ilya Dryomov Date: Wed, 4 Dec 2019 18:08:46 +0000 (+0100) Subject: qa: kernel.sh: unlock before rolling back X-Git-Tag: v14.2.8~20^2~2^2 X-Git-Url: http://git-server-git.apps.pok.os.sepia.ceph.com/?a=commitdiff_plain;h=4e38db24948533a4f6e274cd4d40f2e3ce762443;p=ceph.git qa: kernel.sh: unlock before rolling back "rbd snap rollback" expects an unlocked image, but we may get there locked if object map is enabled (or if lock_on_read is specified in rbd_default_map_options). Signed-off-by: Ilya Dryomov (cherry picked from commit 3aae140353a4b27dfe6e2d2ac7a49cdcdbbe5ffe) --- diff --git a/qa/workunits/rbd/kernel.sh b/qa/workunits/rbd/kernel.sh index 4c15983d4b3a..faa5760eed83 100755 --- a/qa/workunits/rbd/kernel.sh +++ b/qa/workunits/rbd/kernel.sh @@ -77,6 +77,10 @@ cp /tmp/img1 /tmp/img1.trunc truncate -s 41943040 /tmp/img1.trunc cmp /tmp/img1.trunc /tmp/img1.small +# rollback expects an unlocked image +# (acquire and) release the lock as a side effect +rbd bench --io-type read --io-size 1 --io-threads 1 --io-total 1 testimg1 + # rollback and check data again rbd snap rollback --snap=snap1 testimg1 cat /sys/bus/rbd/devices/$DEV_ID1/size | grep 76800000