]> git.apps.os.sepia.ceph.com Git - ceph.git/commit
librbd: always refresh after creating snapshot in CreatePrimaryRequest 51429/head
authorIlya Dryomov <idryomov@gmail.com>
Mon, 17 Apr 2023 21:31:37 +0000 (23:31 +0200)
committerChristopher Hoffman <choffman@redhat.com>
Wed, 10 May 2023 23:44:00 +0000 (23:44 +0000)
commit70adbbe58f79c2ec72c6cd13a9482c30bfe6ecf1
tree06971c573120a2e5ee60ea99b77cad971c301bad
parentdf274a879da302dda52211a9edad15d3dd9688b0
librbd: always refresh after creating snapshot in CreatePrimaryRequest

Up until now this was conditioned on whether the caller expressed
interest in the ID of the created snapshot and happened to work only
because CreatePrimaryRequest wasn't actually consulting any mirror
snapshot metadata.  This has just changed with unlink_peer() needing to
see an up-to-date complete flag which is set in SetImageStateRequest
following the write out of image state object(s).

Signed-off-by: Ilya Dryomov <idryomov@gmail.com>
(cherry picked from commit df2bb13d0308d2d48d846d11e19e9b93e1a050a2)
src/librbd/mirror/snapshot/CreatePrimaryRequest.cc
src/test/librbd/mirror/snapshot/test_mock_CreatePrimaryRequest.cc