diff options
author | Sage Weil <sage@newdream.net> | 2010-10-14 14:40:54 -0700 |
---|---|---|
committer | Sage Weil <sage@newdream.net> | 2010-11-09 09:55:43 -0800 |
commit | e1588dc40b13f41a65b7c2c36bb1139a53282cc4 (patch) | |
tree | ab7fcbebc1b633059f45cc23ecd618bc3b145604 /src/mds/SessionMap.cc | |
parent | 05a473877b4b23c1daf17bb2195f719055cb1ab8 (diff) | |
download | ceph-e1588dc40b13f41a65b7c2c36bb1139a53282cc4.tar.gz |
mds: wipe out client sessions on startup
For disaster recovery and such.
Signed-off-by: Sage Weil <sage@newdream.net>
Diffstat (limited to 'src/mds/SessionMap.cc')
-rw-r--r-- | src/mds/SessionMap.cc | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/src/mds/SessionMap.cc b/src/mds/SessionMap.cc index 3937280ff3e..2aa40595b52 100644 --- a/src/mds/SessionMap.cc +++ b/src/mds/SessionMap.cc @@ -213,6 +213,19 @@ void SessionMap::decode(bufferlist::iterator& p) +void SessionMap::wipe() +{ + dout(1) << "wipe start" << dendl; + dump(); + while (!session_map.empty()) { + Session *s = session_map.begin()->second; + remove_session(s); + } + version = ++projected; + dout(1) << "wipe result" << dendl; + dump(); + dout(1) << "wipe done" << dendl; +} void SessionMap::wipe_ino_prealloc() { |