]> git.apps.os.sepia.ceph.com Git - ceph-ci.git/commit
librbd: avoid refreshing within the mirror state machines
authorJason Dillaman <dillaman@redhat.com>
Thu, 30 Jan 2020 22:45:40 +0000 (17:45 -0500)
committerJason Dillaman <dillaman@redhat.com>
Fri, 31 Jan 2020 04:04:20 +0000 (23:04 -0500)
commit399a335de4d9e9b8c9395c16c346b62c8a35d5c9
treeeb61161fdd3631081a0fb3c180e5b51514b52d8d
parent33b15088c88ecbcacb9308425c5a09515e2f7b4c
librbd: avoid refreshing within the mirror state machines

The refresh has been moved up to the API layer. Also avoid querying
the MirrorImage struct when creating mirror primary snapshots since
(1) when enabling the record won't exist yet and (2) in the demote/
promote cases it would have just been read by the previous state
machine.

Signed-off-by: Jason Dillaman <dillaman@redhat.com>
src/librbd/api/Mirror.cc
src/librbd/mirror/DemoteRequest.cc
src/librbd/mirror/PromoteRequest.cc
src/librbd/mirror/snapshot/CreatePrimaryRequest.cc
src/librbd/mirror/snapshot/CreatePrimaryRequest.h
src/librbd/mirror/snapshot/DemoteRequest.cc
src/librbd/mirror/snapshot/DemoteRequest.h
src/librbd/mirror/snapshot/PromoteRequest.cc
src/librbd/mirror/snapshot/PromoteRequest.h
src/test/librbd/mirror/snapshot/test_mock_CreatePrimaryRequest.cc
src/test/librbd/mirror/snapshot/test_mock_PromoteRequest.cc