]> git-server-git.apps.pok.os.sepia.ceph.com Git - ceph.git/commit
rbd-mirror: remove image_map next_state if sets to the same state 43662/head
authorArthur Outhenin-Chalandre <arthur.outhenin-chalandre@cern.ch>
Fri, 6 Aug 2021 13:54:38 +0000 (15:54 +0200)
committerArthur Outhenin-Chalandre <arthur.outhenin-chalandre@cern.ch>
Tue, 26 Oct 2021 08:28:57 +0000 (10:28 +0200)
commit55247a4bdf6ba1a66290c75f44cd30e250e6ba38
tree7a39b3fb043f087f250e7f80b4bd942f5ded95ca
parent9e10f257b954e0a745bc589567c85185a627c33a
rbd-mirror: remove image_map next_state if sets to the same state

In some cases, set_state is called with DISSOCIATING, then ASSOCIATING
and DISSOCIATING again. In this case the state DISSOCIATING is
processed to remove the image and then schedule the next action which is
associating.

To fix this case, this commit removes the next_state if the state is
sets to the same state.

Signed-off-by: Arthur Outhenin-Chalandre <arthur.outhenin-chalandre@cern.ch>
(cherry picked from commit b664a95889b35d0d3afbd8428e3af4976d7f81eb)
src/tools/rbd_mirror/image_map/Policy.cc