]> git-server-git.apps.pok.os.sepia.ceph.com Git - ceph.git/commit
librbd: always refresh after creating snapshot in CreatePrimaryRequest 51173/head
authorIlya Dryomov <idryomov@gmail.com>
Mon, 17 Apr 2023 21:31:37 +0000 (23:31 +0200)
committerIlya Dryomov <idryomov@gmail.com>
Fri, 21 Apr 2023 16:43:40 +0000 (18:43 +0200)
commitf96d99c886cd076bba36c34df818bfc03e46f924
treecde3aa87bab9faccea509b975fd212dd5957d535
parentbdec1574b3523a60ebbc1c8529ab1102c5ad6cd4
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