]> git.apps.os.sepia.ceph.com Git - ceph-ci.git/commit
librbd: always refresh after creating snapshot in CreatePrimaryRequest
authorIlya Dryomov <idryomov@gmail.com>
Mon, 17 Apr 2023 21:31:37 +0000 (23:31 +0200)
committerIlya Dryomov <idryomov@gmail.com>
Tue, 16 May 2023 20:15:52 +0000 (22:15 +0200)
commit66d2555bf878dc4320ea639d90f08170137e2e15
tree3b45602395e4df0b57ab4ba9d6abbf05d6d1bafe
parentef2b3be27e55e130907defa34971ecfbc36b51e1
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