From b85a24acd18d23dfd4122fbf943f44ea0ff240c7 Mon Sep 17 00:00:00 2001 From: Sage Weil Date: Mon, 2 Apr 2018 20:57:04 -0500 Subject: [PATCH] os/ObjectStore: add has_contexts() Signed-off-by: Sage Weil --- src/os/ObjectStore.h | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/src/os/ObjectStore.h b/src/os/ObjectStore.h index 695ca731ff8..b70a07731c1 100644 --- a/src/os/ObjectStore.h +++ b/src/os/ObjectStore.h @@ -522,6 +522,12 @@ public: register_on_applied(new ContainerContext(_complete)); register_on_commit(new ContainerContext(_complete)); } + bool has_contexts() const { + return + !on_commit.empty() || + !on_applied.empty() || + !on_applied_sync.empty(); + } static void collect_contexts( vector& t, -- 2.39.5