mds
- migrator import/export of versioned dentries, inodes... drop them on export...
-- purge snap during readdir
/- call open_parents() where needed.
- what about during recovery? e.g. client reconnected caps...
- resolve/rejoin vs snapshots!
-// IMPORT/EXPORT
-void CInode::encode_export(bufferlist& bl)
+void CInode::_encode_base(bufferlist& bl)
{
- ::encode(inode, bl);
+ ::encode(inode, bl);
::encode(symlink, bl);
::encode(dirfragtree, bl);
::encode(xattrs, bl);
encode_snap(bl);
-
- bool dirty = is_dirty();
- ::encode(dirty, bl);
+}
+void CInode::_decode_base(bufferlist::iterator& p)
+{
+ bool was_anchored = inode.anchored;
+ ::decode(inode, p);
+ if (parent && was_anchored != inode.anchored)
+ parent->adjust_nested_anchors((int)inode.anchored - (int)was_anchored);
- ::encode(pop, bl);
-
- ::encode(replica_map, bl);
+ ::decode(symlink, p);
+ ::decode(dirfragtree, p);
+ ::decode(xattrs, p);
+ decode_snap(p);
+}
+void CInode::_encode_locks_full(bufferlist& bl)
+{
::encode(authlock, bl);
::encode(linklock, bl);
::encode(dirfragtreelock, bl);
::encode(xattrlock, bl);
::encode(snaplock, bl);
::encode(nestlock, bl);
+}
+void CInode::_decode_locks_full(bufferlist::iterator& p)
+{
+ ::decode(authlock, p);
+ ::decode(linklock, p);
+ ::decode(dirfragtreelock, p);
+ ::decode(filelock, p);
+ ::decode(dirlock, p);
+ ::decode(xattrlock, p);
+ ::decode(snaplock, p);
+ ::decode(nestlock, p);
+}
+void CInode::_encode_locks_state(bufferlist& bl)
+{
+ authlock.encode_state(bl);
+ linklock.encode_state(bl);
+ dirfragtreelock.encode_state(bl);
+ filelock.encode_state(bl);
+ dirlock.encode_state(bl);
+ nestlock.encode_state(bl);
+ xattrlock.encode_state(bl);
+ snaplock.encode_state(bl);
+}
+void CInode::_decode_locks_state(bufferlist::iterator& p)
+{
+ authlock.decode_state(p);
+ linklock.decode_state(p);
+ dirfragtreelock.decode_state(p);
+ filelock.decode_state(p);
+ dirlock.decode_state(p);
+ nestlock.decode_state(p);
+ xattrlock.decode_state(p);
+ snaplock.decode_state(p);
+}
+void CInode::_decode_locks_rejoin(bufferlist::iterator& p, list<Context*>& waiters)
+{
+ authlock.decode_state_rejoin(p, waiters);
+ linklock.decode_state_rejoin(p, waiters);
+ dirfragtreelock.decode_state_rejoin(p, waiters);
+ filelock.decode_state_rejoin(p, waiters);
+ dirlock.decode_state_rejoin(p, waiters);
+ nestlock.decode_state_rejoin(p, waiters);
+ xattrlock.decode_state_rejoin(p, waiters);
+ snaplock.decode_state_rejoin(p, waiters);
+}
+
+
+// IMPORT/EXPORT
+
+void CInode::encode_export(bufferlist& bl)
+{
+ _encode_base(bl);
+
+ bool dirty = is_dirty();
+ ::encode(dirty, bl);
+
+ ::encode(pop, bl);
+
+ ::encode(replica_map, bl);
+
+ _encode_locks_full(bl);
get(PIN_TEMPEXPORTING);
}
void CInode::decode_import(bufferlist::iterator& p,
LogSegment *ls)
{
- bool was_anchored = inode.anchored;
- ::decode(inode, p);
- if (parent && was_anchored != inode.anchored)
- parent->adjust_nested_anchors((int)inode.anchored - (int)was_anchored);
-
- ::decode(symlink, p);
- ::decode(dirfragtree, p);
- ::decode(xattrs, p);
- decode_snap(p);
+ _decode_base(p);
bool dirty;
::decode(dirty, p);
::decode(replica_map, p);
if (!replica_map.empty()) get(PIN_REPLICATED);
- ::decode(authlock, p);
- ::decode(linklock, p);
- ::decode(dirfragtreelock, p);
- ::decode(filelock, p);
- ::decode(dirlock, p);
- ::decode(xattrlock, p);
- ::decode(snaplock, p);
- ::decode(nestlock, p);
+ _decode_locks_full(p);
}
void add_waiter(int tag, Context *c);
+ // -- encode/decode helpers --
+ void _encode_base(bufferlist& bl);
+ void _decode_base(bufferlist::iterator& p);
+ void _encode_locks_full(bufferlist& bl);
+ void _decode_locks_full(bufferlist::iterator& p);
+ void _encode_locks_state(bufferlist& bl);
+ void _decode_locks_state(bufferlist::iterator& p);
+ void _decode_locks_rejoin(bufferlist::iterator& p, list<Context*>& waiters);
+
+
// -- import/export --
void encode_export(bufferlist& bl);
void finish_export(utime_t now);
// discover
class CInodeDiscover {
-
- inode_t inode;
- string symlink;
- fragtree_t dirfragtree;
- map<string, bufferptr> xattrs;
+ inodeno_t ino;
+ bufferlist base;
+ bufferlist locks;
__s32 replica_nonce;
- __u32 authlock_state;
- __u32 linklock_state;
- __u32 dirfragtreelock_state;
- __u32 filelock_state;
- __u32 dirlock_state;
- __u32 xattrlock_state;
- __u32 snaplock_state;
- __u32 nestlock_state;
-
public:
CInodeDiscover() {}
CInodeDiscover(CInode *in, int nonce) {
- inode = in->inode;
- symlink = in->symlink;
- dirfragtree = in->dirfragtree;
- xattrs = in->xattrs;
-
+ ino = in->ino();
+ in->_encode_base(base);
+ in->_encode_locks_state(locks);
replica_nonce = nonce;
-
- authlock_state = in->authlock.get_replica_state();
- linklock_state = in->linklock.get_replica_state();
- dirfragtreelock_state = in->dirfragtreelock.get_replica_state();
- filelock_state = in->filelock.get_replica_state();
- dirlock_state = in->dirlock.get_replica_state();
- xattrlock_state = in->xattrlock.get_replica_state();
- snaplock_state = in->snaplock.get_replica_state();
- nestlock_state = in->nestlock.get_replica_state();
}
CInodeDiscover(bufferlist::iterator &p) {
decode(p);
}
- inodeno_t get_ino() { return inode.ino; }
+ inodeno_t get_ino() { return ino; }
int get_replica_nonce() { return replica_nonce; }
void update_inode(CInode *in) {
- if (in->parent && inode.anchored != in->inode.anchored)
- in->parent->adjust_nested_anchors((int)inode.anchored - (int)in->inode.anchored);
- in->inode = inode;
- in->symlink = symlink;
- in->dirfragtree = dirfragtree;
- in->xattrs = xattrs;
+ bufferlist::iterator p = base.begin();
+ in->_decode_base(p);
in->replica_nonce = replica_nonce;
}
void init_inode_locks(CInode *in) {
- in->authlock.set_state(authlock_state);
- in->linklock.set_state(linklock_state);
- in->dirfragtreelock.set_state(dirfragtreelock_state);
- in->filelock.set_state(filelock_state);
- in->dirlock.set_state(dirlock_state);
- in->xattrlock.set_state(xattrlock_state);
- in->snaplock.set_state(snaplock_state);
- in->nestlock.set_state(nestlock_state);
+ bufferlist::iterator p = base.begin();
+ in->_decode_locks_state(p);
}
void encode(bufferlist &bl) const {
- ::encode(inode, bl);
- ::encode(symlink, bl);
- ::encode(dirfragtree, bl);
- ::encode(xattrs, bl);
+ ::encode(ino, bl);
+ ::encode(base, bl);
+ ::encode(locks, bl);
::encode(replica_nonce, bl);
- ::encode(authlock_state, bl);
- ::encode(linklock_state, bl);
- ::encode(dirfragtreelock_state, bl);
- ::encode(filelock_state, bl);
- ::encode(dirlock_state, bl);
- ::encode(xattrlock_state, bl);
- ::encode(snaplock_state, bl);
- ::encode(nestlock_state, bl);
}
void decode(bufferlist::iterator &p) {
- ::decode(inode, p);
- ::decode(symlink, p);
- ::decode(dirfragtree, p);
- ::decode(xattrs, p);
+ ::decode(ino, p);
+ ::decode(base, p);
+ ::decode(locks, p);
::decode(replica_nonce, p);
- ::decode(authlock_state, p);
- ::decode(linklock_state, p);
- ::decode(dirfragtreelock_state, p);
- ::decode(filelock_state, p);
- ::decode(dirlock_state, p);
- ::decode(xattrlock_state, p);
- ::decode(snaplock_state, p);
- ::decode(nestlock_state, p);
}
};
-/** rejoin_set_state
- * @lock the lock
- * @s the new state
- * @waiters list for anybody waiting on this lock
- */
-void Locker::rejoin_set_state(SimpleLock *lock, int s, list<Context*>& waiters)
-{
- if (!lock->is_stable()) {
- lock->set_state(s);
- lock->get_parent()->auth_unpin(lock);
- } else {
- lock->set_state(s);
- }
- lock->take_waiting(SimpleLock::WAIT_ALL, waiters);
-}
-
-
-
-
// file i/o -----------------------------------------
version_t Locker::issue_file_data_version(CInode *in)
bool wrlock_start(SimpleLock *lock, MDRequest *mut);
void wrlock_finish(SimpleLock *lock, Mutation *mut);
-public:
- void rejoin_set_state(SimpleLock *lock, int s, list<Context*>& waiters);
-
// simple
public:
void try_simple_eval(SimpleLock *lock);
// strong
if (p->first == 0 && root) {
p->second->add_weak_inode(root->ino());
- p->second->add_strong_inode(root->ino(), root->get_replica_nonce(),
+ p->second->add_strong_inode(root->ino(),
root->get_caps_wanted(),
- root->authlock.get_state(),
- root->linklock.get_state(),
- root->dirfragtreelock.get_state(),
- root->filelock.get_state(),
root->dirlock.get_state(),
- root->nestlock.get_state(),
- root->snaplock.get_state(),
- root->xattrlock.get_state());
+ root->nestlock.get_state());
}
if (CInode *in = get_inode(MDS_INO_STRAY(p->first))) {
p->second->add_weak_inode(in->ino());
- p->second->add_strong_inode(in->ino(), in->get_replica_nonce(),
+ p->second->add_strong_inode(in->ino(),
in->get_caps_wanted(),
- in->authlock.get_state(),
- in->linklock.get_state(),
- in->dirfragtreelock.get_state(),
- in->filelock.get_state(),
in->dirlock.get_state(),
- in->nestlock.get_state(),
- in->snaplock.get_state(),
- in->xattrlock.get_state());
+ in->nestlock.get_state());
}
}
}
if (dn->is_primary()) {
CInode *in = dn->get_inode();
dout(15) << " add_strong_inode " << *in << dendl;
- rejoin->add_strong_inode(in->ino(), in->get_replica_nonce(),
+ rejoin->add_strong_inode(in->ino(),
in->get_caps_wanted(),
- in->authlock.get_state(),
- in->linklock.get_state(),
- in->dirfragtreelock.get_state(),
- in->filelock.get_state(),
in->dirlock.get_state(),
- in->nestlock.get_state(),
- in->snaplock.get_state(),
- in->xattrlock.get_state());
+ in->nestlock.get_state());
in->get_nested_dirfrags(nested);
}
}
in->dirlock.set_state(LOCK_SCATTER);
if (ack) {
- ack->add_full_inode(in->inode, in->symlink, in->dirfragtree);
- ack->add_strong_inode(in->ino(),
- inonce,
- 0,
- in->authlock.get_replica_state(),
- in->linklock.get_replica_state(),
- in->dirfragtreelock.get_replica_state(),
- in->filelock.get_replica_state(),
- in->dirlock.get_replica_state(),
- in->nestlock.get_replica_state(),
- in->snaplock.get_replica_state(),
- in->xattrlock.get_replica_state());
+ ack->add_inode_base(in);
+ ack->add_inode_locks(in, inonce);
}
}
}
dout(10) << " have base " << *in << dendl;
if (ack)
- ack->add_strong_inode(in->ino(),
- inonce,
- 0,
- in->authlock.get_replica_state(),
- in->linklock.get_replica_state(),
- in->dirfragtreelock.get_replica_state(),
- in->filelock.get_replica_state(),
- in->dirlock.get_replica_state(),
- in->nestlock.get_replica_state(),
- in->snaplock.get_replica_state(),
- in->xattrlock.get_replica_state());
+ ack->add_inode_locks(in, inonce);
}
if (survivor) {
assert(0); // uh oh.
}
dn->set_replica_nonce(q->second.nonce);
- mds->locker->rejoin_set_state(&dn->lock, q->second.lock, waiters);
+ dn->lock.set_state_rejoin(q->second.lock, waiters);
dn->state_clear(CDentry::STATE_REJOINING);
dout(10) << " got " << *dn << dendl;
}
}
// full inodes
- for (list<MMDSCacheRejoin::inode_full>::iterator p = ack->full_inodes.begin();
- p != ack->full_inodes.end();
- ++p) {
- CInode *in = get_inode(p->inode.ino);
+ bufferlist::iterator p = ack->inode_base.begin();
+ while (!p.end()) {
+ inodeno_t ino;
+ ::decode(ino, p);
+ CInode *in = get_inode(ino);
if (!in) continue;
- if (in->parent && in->inode.anchored != p->inode.anchored)
- in->parent->adjust_nested_anchors( (int)p->inode.anchored - (int)in->inode.anchored );
- in->inode = p->inode;
- in->symlink = p->symlink;
- in->dirfragtree = p->dirfragtree;
+ in->_decode_base(p);
dout(10) << " got inode content " << *in << dendl;
}
// inodes
- for (map<inodeno_t, MMDSCacheRejoin::inode_strong>::iterator p = ack->strong_inodes.begin();
- p != ack->strong_inodes.end();
- ++p) {
- CInode *in = get_inode(p->first);
+ p = ack->inode_locks.begin();
+ while (!p.end()) {
+ inodeno_t ino;
+ ::decode(ino, p);
+ int32_t nonce;
+ ::decode(nonce, p);
+ CInode *in = get_inode(ino);
if (!in) continue;
- in->set_replica_nonce(p->second.nonce);
- mds->locker->rejoin_set_state(&in->authlock, p->second.authlock, waiters);
- mds->locker->rejoin_set_state(&in->linklock, p->second.linklock, waiters);
- mds->locker->rejoin_set_state(&in->dirfragtreelock, p->second.dirfragtreelock, waiters);
- mds->locker->rejoin_set_state(&in->filelock, p->second.filelock, waiters);
- mds->locker->rejoin_set_state(&in->dirlock, p->second.dirlock, waiters);
+ in->set_replica_nonce(nonce);
+ in->_decode_locks_rejoin(p, waiters);
in->state_clear(CInode::STATE_REJOINING);
dout(10) << " got " << *in << dendl;
}
}
dout(10) << " sending " << *in << dendl;
- full->add_full_inode(in->inode, in->symlink, in->dirfragtree);
+ full->add_inode_base(in);
}
mds->send_message_mds(full, missing->get_source().num());
int from = full->get_source().num();
// integrate full inodes
- for (list<MMDSCacheRejoin::inode_full>::iterator p = full->full_inodes.begin();
- p != full->full_inodes.end();
- ++p) {
- CInode *in = get_inode(p->inode.ino);
+ bufferlist::iterator p = full->inode_base.begin();
+ while (!p.end()) {
+ inodeno_t ino;
+ ::decode(ino, p);
+ CInode *in = get_inode(ino);
assert(in);
+ in->_decode_base(p);
set<CInode*>::iterator q = rejoin_undef_inodes.find(in);
if (q != rejoin_undef_inodes.end()) {
CInode *in = *q;
- if (in->parent && in->inode.anchored != p->inode.anchored)
- in->parent->adjust_nested_anchors( (int)p->inode.anchored - (int)in->inode.anchored );
- in->inode = p->inode;
- in->symlink = p->symlink;
- in->dirfragtree = p->dirfragtree;
in->state_clear(CInode::STATE_REJOINUNDEF);
dout(10) << " got full " << *in << dendl;
rejoin_undef_inodes.erase(q);
for (map<int,int>::iterator r = in->replicas_begin();
r != in->replicas_end();
++r) {
- ack[r->first]->add_full_inode(in->inode, in->symlink, in->dirfragtree);
- ack[r->first]->add_strong_inode(in->ino(), r->second, 0,
- in->authlock.get_replica_state(),
- in->linklock.get_replica_state(),
- in->dirfragtreelock.get_replica_state(),
- in->filelock.get_replica_state(),
- in->dirlock.get_replica_state(),
- in->nestlock.get_replica_state(),
- in->snaplock.get_replica_state(),
- in->xattrlock.get_replica_state());
+ ack[r->first]->add_inode_base(in);
+ ack[r->first]->add_inode_locks(in, r->second);
}
// subdirs in this subtree?
}
}
- // root inodes too
- if (root)
+ // base inodes too
+ if (root && root->is_auth())
for (map<int,int>::iterator r = root->replicas_begin();
r != root->replicas_end();
++r) {
- ack[r->first]->add_full_inode(root->inode, root->symlink, root->dirfragtree);
- ack[r->first]->add_strong_inode(root->ino(), r->second, 0,
- root->authlock.get_replica_state(),
- root->linklock.get_replica_state(),
- root->dirfragtreelock.get_replica_state(),
- root->filelock.get_replica_state(),
- root->dirlock.get_replica_state(),
- root->nestlock.get_replica_state(),
- root->snaplock.get_replica_state(),
- root->xattrlock.get_replica_state());
+ ack[r->first]->add_inode_base(root);
+ ack[r->first]->add_inode_locks(root, r->second);
}
if (stray)
for (map<int,int>::iterator r = stray->replicas_begin();
r != stray->replicas_end();
++r) {
- ack[r->first]->add_full_inode(stray->inode, stray->symlink, stray->dirfragtree);
- ack[r->first]->add_strong_inode(stray->ino(), r->second, 0,
- stray->authlock.get_replica_state(),
- stray->linklock.get_replica_state(),
- stray->dirfragtreelock.get_replica_state(),
- stray->filelock.get_replica_state(),
- stray->dirlock.get_replica_state(),
- stray->nestlock.get_replica_state(),
- stray->snaplock.get_replica_state(),
- stray->xattrlock.get_replica_state());
+ ack[r->first]->add_inode_base(stray);
+ ack[r->first]->add_inode_locks(stray, r->second);
}
// send acks
if (dn->is_auth()) {
// add back into lru (at the top)
lru.lru_insert_top(dn);
-
+
if (!first_auth) {
first_auth = dn;
} else {
state = s;
assert(!is_stable() || gather_set.size() == 0); // gather should be empty in stable states.
return s;
- };
+ }
+ void set_state_rejoin(int s, list<Context*>& waiters) {
+ if (!is_stable()) {
+ state = s;
+ get_parent()->auth_unpin(this);
+ } else {
+ state = s;
+ }
+ take_waiting(SimpleLock::WAIT_ALL, waiters);
+ }
+
bool is_stable() {
return state >= 0;
}
::decode(state, p);
::decode(gather_set, p);
}
+ void encode_state(bufferlist& bl) const {
+ ::encode(state, bl);
+ }
+ void decode_state(bufferlist::iterator& p) {
+ ::decode(state, p);
+ }
+ void decode_state_rejoin(bufferlist::iterator& p, list<Context*>& waiters) {
+ __s32 s;
+ ::decode(s, p);
+ set_state_rejoin(s, waiters);
+ }
+
// simplelock specifics
#include "include/types.h"
+#include "mds/CInode.h"
+
// sent from replica to auth
class MMDSCacheRejoin : public Message {
// -- types --
struct inode_strong {
int32_t caps_wanted;
- int32_t nonce;
- int32_t authlock;
- int32_t linklock;
- int32_t dirfragtreelock;
- int32_t filelock;
- int32_t dirlock, nestlock, snaplock, xattrlock;
+ int32_t dirlock, nestlock;
inode_strong() {}
- inode_strong(int n, int cw=0, int a=0, int l=0, int dft=0, int f=0, int dl=0, int nl=0, int snl=0, int xal=0) :
+ inode_strong(int cw, int dl, int nl) :
caps_wanted(cw),
- nonce(n),
- authlock(a), linklock(l), dirfragtreelock(dft), filelock(f), dirlock(dl), nestlock(nl), snaplock(snl), xattrlock(xal) { }
+ dirlock(dl), nestlock(nl) { }
void encode(bufferlist &bl) const {
::encode(caps_wanted, bl);
- ::encode(nonce, bl);
- ::encode(authlock, bl);
- ::encode(linklock, bl);
- ::encode(dirfragtreelock, bl);
- ::encode(filelock, bl);
::encode(dirlock, bl);
::encode(nestlock, bl);
- ::encode(snaplock, bl);
- ::encode(xattrlock, bl);
}
void decode(bufferlist::iterator &bl) {
::decode(caps_wanted, bl);
- ::decode(nonce, bl);
- ::decode(authlock, bl);
- ::decode(linklock, bl);
- ::decode(dirfragtreelock, bl);
- ::decode(filelock, bl);
::decode(dirlock, bl);
::decode(nestlock, bl);
- ::decode(snaplock, bl);
- ::decode(xattrlock, bl);
}
};
WRITE_CLASS_ENCODER(inode_strong)
- struct inode_full {
- inode_t inode;
- string symlink;
- fragtree_t dirfragtree;
- inode_full() {}
- inode_full(const inode_t& i, const string& s, const fragtree_t& f) :
- inode(i), symlink(s), dirfragtree(f) {}
-
- void decode(bufferlist::iterator& p) {
- ::decode(inode, p);
- ::decode(symlink, p);
- ::decode(dirfragtree, p);
- }
- void encode(bufferlist& bl) const {
- ::encode(inode, bl);
- ::encode(symlink, bl);
- ::encode(dirfragtree, bl);
- }
- };
- WRITE_CLASS_ENCODER(inode_full)
-
struct dirfrag_strong {
int32_t nonce;
int8_t dir_rep;
map<inodeno_t,string> cap_export_paths;
// full
- list<inode_full> full_inodes;
+ bufferlist inode_base;
+ bufferlist inode_locks;
// authpins, xlocks
map<inodeno_t, metareqid_t> authpinned_inodes;
void add_weak_inode(inodeno_t i) {
weak_inodes.insert(i);
}
- void add_strong_inode(inodeno_t i, int n, int cw, int a, int l, int dft, int f, int dl, int nl, int snl, int xl) {
- strong_inodes[i] = inode_strong(n, cw, a, l, dft, f, dl, nl, snl, xl);
+ void add_strong_inode(inodeno_t i, int cw, int dl, int nl) {
+ strong_inodes[i] = inode_strong(cw, dl, nl);
+ }
+ void add_inode_locks(CInode *in, int nonce) {
+ ::encode(in->inode.ino, inode_locks);
+ in->_encode_locks_state(inode_locks);
}
- void add_full_inode(inode_t &i, const string& s, const fragtree_t &f) {
- full_inodes.push_back(inode_full(i, s, f));
+ void add_inode_base(CInode *in) {
+ ::encode(in->inode.ino, inode_base);
+ in->_encode_base(inode_base);
}
void add_inode_authpin(inodeno_t ino, const metareqid_t& ri) {
authpinned_inodes[ino] = ri;
void encode_payload() {
::encode(op, payload);
::encode(strong_inodes, payload);
- ::encode(full_inodes, payload);
+ ::encode(inode_base, payload);
+ ::encode(inode_locks, payload);
::encode(authpinned_inodes, payload);
::encode(xlocked_inodes, payload);
::encode(cap_export_bl, payload);
bufferlist::iterator p = payload.begin();
::decode(op, p);
::decode(strong_inodes, p);
- ::decode(full_inodes, p);
+ ::decode(inode_base, p);
+ ::decode(inode_locks, p);
::decode(authpinned_inodes, p);
::decode(xlocked_inodes, p);
::decode(cap_export_bl, p);
};
WRITE_CLASS_ENCODER(MMDSCacheRejoin::inode_strong)
-WRITE_CLASS_ENCODER(MMDSCacheRejoin::inode_full)
WRITE_CLASS_ENCODER(MMDSCacheRejoin::dirfrag_strong)
WRITE_CLASS_ENCODER(MMDSCacheRejoin::dn_strong)
WRITE_CLASS_ENCODER(MMDSCacheRejoin::dn_weak)
# mds
$CEPH_BIN/cmds -d --debug_ms 1 --debug_mds 20 --mds_log_max_segments 10 --mds_thrash_fragments 0 --mds_thrash_exports 0 #--debug_ms 20
-#$CEPH_BIN/cmds -d --debug_ms 1 --debug_mds 20 --mds_thrash_fragments 0 --mds_thrash_exports 0 #--debug_ms 20
-#./cmonctl mds set_max_mds 2
+$CEPH_BIN/cmds -d --debug_ms 1 --debug_mds 20 --mds_thrash_fragments 0 --mds_thrash_exports 0 #--debug_ms 20
+./cmonctl mds set_max_mds 2
echo "started. stop.sh to stop. see out/* (e.g. 'tail -f out/????') for debug output."