"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 <idryomov@gmail.com>
(cherry picked from commit
3aae140353a4b27dfe6e2d2ac7a49cdcdbbe5ffe)
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