mirror of
https://github.com/ceph/ceph
synced 2025-02-22 18:47:18 +00:00
rbd-mirror: fix state comparison in Policy::is_state_scheduled()
Signed-off-by: Venky Shankar <vshankar@redhat.com>
This commit is contained in:
parent
65abcd4801
commit
bd83d93453
@ -395,9 +395,8 @@ bool Policy::set_state(ImageState* image_state, StateTransition::State state,
|
|||||||
|
|
||||||
bool Policy::is_state_scheduled(const ImageState& image_state,
|
bool Policy::is_state_scheduled(const ImageState& image_state,
|
||||||
StateTransition::State state) const {
|
StateTransition::State state) const {
|
||||||
return (image_state.state == StateTransition::STATE_DISSOCIATING ||
|
return (image_state.state == state ||
|
||||||
(image_state.next_state &&
|
(image_state.next_state && *image_state.next_state == state));
|
||||||
*image_state.next_state == StateTransition::STATE_DISSOCIATING));
|
|
||||||
}
|
}
|
||||||
|
|
||||||
} // namespace image_map
|
} // namespace image_map
|
||||||
|
Loading…
Reference in New Issue
Block a user