Calling damaged() on the rank is overkill, but until
we have a mechanism to selectively handle damaged
paths, it's better than killing the daemon.
Signed-off-by: John Spray <john.spray@redhat.com>
}
}
} else {
- dout(1) << "corrupt directory, i got tag char '" << type << "' pos " << pos << dendl;
- assert(0);
+ dout(1) << "corrupt directory, i got tag char '" << type << "' pos "
+ << pos << dendl;
+ cache->mds->clog->error() << "Corrupt directory entry '" << p->first
+ << "' in dirfrag " << *this;
+ // TODO: add a mechanism for selectively marking a path
+ // damaged, rather than marking the whole rank damaged.
+ cache->mds->damaged();
+ assert(0); // Unreachable: damaged() respawns us
}
if (dn && want_dn.length() && want_dn == dname) {