diff options
Diffstat (limited to 'src/mds/ScatterLock.h')
-rw-r--r-- | src/mds/ScatterLock.h | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/src/mds/ScatterLock.h b/src/mds/ScatterLock.h index 211be26da46..d31bf72752c 100644 --- a/src/mds/ScatterLock.h +++ b/src/mds/ScatterLock.h @@ -67,6 +67,16 @@ public: void set_last_scatter(utime_t t) { last_scatter = t; } utime_t get_last_scatter() { return last_scatter; } + void infer_state_from_strong_rejoin(int rstate, bool locktoo) { + if (rstate == LOCK_MIX || + rstate == LOCK_MIX_LOCK || // replica still has wrlocks? + rstate == LOCK_MIX_SYNC || // " + rstate == LOCK_MIX_TSYN) // " + state = LOCK_MIX; + else if (locktoo && rstate == LOCK_LOCK) + state = LOCK_LOCK; + } + void print(ostream& out) { out << "("; _print(out); |