From 0ecfdb95eb695085b02220a42c7b51e9b54e6418 Mon Sep 17 00:00:00 2001 From: Ilya Dryomov Date: Wed, 4 Dec 2019 19:08:46 +0100 Subject: [PATCH] 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) --- qa/workunits/rbd/kernel.sh | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/qa/workunits/rbd/kernel.sh b/qa/workunits/rbd/kernel.sh index 4c15983d4b3a2..faa5760eed83d 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 -- 2.39.5