]> git-server-git.apps.pok.os.sepia.ceph.com Git - ceph.git/commit
librbd: always refresh after creating snapshot in CreatePrimaryRequest 50324/head
authorIlya Dryomov <idryomov@gmail.com>
Mon, 17 Apr 2023 21:31:37 +0000 (23:31 +0200)
committerIlya Dryomov <idryomov@gmail.com>
Wed, 19 Apr 2023 09:05:05 +0000 (11:05 +0200)
commitdf2bb13d0308d2d48d846d11e19e9b93e1a050a2
tree2ca2624eccf143217a303b3cb098a0ed7cc0f802
parent165c9a4e163c5edfa77c900f61c680cc944b2b5d
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>
src/librbd/mirror/snapshot/CreatePrimaryRequest.cc
src/test/librbd/mirror/snapshot/test_mock_CreatePrimaryRequest.cc