]> git.apps.os.sepia.ceph.com Git - ceph.git/commitdiff
librbd: properly copy primary mirror uuid to out param
authorJason Dillaman <dillaman@redhat.com>
Tue, 10 Mar 2020 02:08:01 +0000 (22:08 -0400)
committerJason Dillaman <dillaman@redhat.com>
Tue, 10 Mar 2020 23:23:02 +0000 (19:23 -0400)
This variable is not currently used in snapshot-based mirroring
mode but it should be populated for consistency.

Signed-off-by: Jason Dillaman <dillaman@redhat.com>
src/librbd/mirror/GetInfoRequest.cc

index 0f6981fc743b63eb4e425894777c36ffbcea3f7f..4ec529ba89807951ba477bdc70056a1a66c60501 100644 (file)
@@ -269,6 +269,7 @@ void GetInfoRequest<I>::calc_promotion_state(
         break;
       case cls::rbd::MIRROR_SNAPSHOT_STATE_NON_PRIMARY:
         *m_promotion_state = PROMOTION_STATE_NON_PRIMARY;
+        *m_primary_mirror_uuid = mirror_ns->primary_mirror_uuid;
         break;
       case cls::rbd::MIRROR_SNAPSHOT_STATE_PRIMARY_DEMOTED:
       case cls::rbd::MIRROR_SNAPSHOT_STATE_NON_PRIMARY_DEMOTED: