]> git.apps.os.sepia.ceph.com Git - ceph-ci.git/commit
librbd: enable/disable implicit non-primary feature bit
authorJason Dillaman <dillaman@redhat.com>
Mon, 9 Mar 2020 21:04:27 +0000 (17:04 -0400)
committerJason Dillaman <dillaman@redhat.com>
Tue, 10 Mar 2020 23:23:02 +0000 (19:23 -0400)
commit814c13a8cfb12568baa5c6978965edd68c908b1a
tree8d4ff1b1cf02a3b90eff49d98703d6ea34d94c24
parent820a157cb8018b7f8c75808d67421ab36b1417a0
librbd: enable/disable implicit non-primary feature bit

When promoted to primary, disable the non-primary feature bit and
when demoted (or created non-primary), enable the non-primary feature
bit. This will prevent all non rbd-mirror RBD clients from modifying
the RBD image.

Signed-off-by: Jason Dillaman <dillaman@redhat.com>
src/librbd/api/Mirror.cc
src/librbd/mirror/EnableRequest.cc
src/librbd/mirror/EnableRequest.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