summaryrefslogtreecommitdiffstats
path: root/src/mds/CDir.h
diff options
context:
space:
mode:
Diffstat (limited to 'src/mds/CDir.h')
-rw-r--r--src/mds/CDir.h10
1 files changed, 10 insertions, 0 deletions
diff --git a/src/mds/CDir.h b/src/mds/CDir.h
index 215375ca297..3e2b0adffb0 100644
--- a/src/mds/CDir.h
+++ b/src/mds/CDir.h
@@ -546,6 +546,16 @@ public:
void maybe_finish_freeze();
+ size_t count_unfreeze_tree_waiters() {
+ size_t n = count_unfreeze_dir_waiters();
+ _walk_tree([&n](CDir *dir) {
+ n += dir->count_unfreeze_dir_waiters();
+ return true;
+ });
+ return n;
+ }
+ inline size_t count_unfreeze_dir_waiters() const { return count_waiters(WAIT_UNFREEZE); }
+
std::pair<bool,bool> is_freezing_or_frozen_tree() const {
if (freeze_tree_state) {
if (freeze_tree_state->frozen)