Add asserts...
At (5): Function "MDCache::get_dirfrag(dirfrag_t)" returns null (checked 33 out of 39 times). [show details]
At (6): Assigning: "dir" = null return value from "MDCache::get_dirfrag(dirfrag_t)".
CID 717007 (#1 of 1): Dereference null return value (NULL_RETURNS)
At (7): Dereferencing a pointer that might be null "dir" when calling "MDCache::adjust_bounded_subtree_auth(CDir *, std::vector<dirfrag_t, std::allocator<dirfrag_t> > &, std::pair<int, int>)". [show details]
CID 717006 (#1 of 1): Dereference null return value (NULL_RETURNS)
At (5): Dereferencing a pointer that might be null "dir" when calling "MDCache::adjust_bounded_subtree_auth(CDir *, std::vector<dirfrag_t, std::allocator<dirfrag_t> > &, std::pair<int, int>)". [show details]
CID 717005 (#2 of 2): Dereference null return value (NULL_RETURNS)
At (22): Dereferencing a pointer that might be null "dir" when calling "MDCache::adjust_bounded_subtree_auth(CDir *, std::vector<dirfrag_t, std::allocator<dirfrag_t> > &, int)". [show details]
Signed-off-by: Sage Weil <sage@inktank.com>
p != subtrees.end();
++p) {
CDir *dir = mds->mdcache->get_dirfrag(p->first);
+ assert(dir);
if (ambiguous_subtrees.count(p->first)) {
// ambiguous!
mds->mdcache->add_ambiguous_import(p->first, p->second);
// set auth partially to us so we don't trim it
CDir *dir = mds->mdcache->get_dirfrag(base);
+ assert(dir);
mds->mdcache->adjust_bounded_subtree_auth(dir, bounds, pair<int,int>(mds->get_nodeid(), mds->get_nodeid()));
// open client sessions?
{
if (mds->mdcache->have_ambiguous_import(base)) {
dout(10) << "EImportFinish.replay " << base << " success=" << success << dendl;
- if (success)
+ if (success) {
mds->mdcache->finish_ambiguous_import(base);
- else {
+ } else {
CDir *dir = mds->mdcache->get_dirfrag(base);
+ assert(dir);
vector<dirfrag_t> bounds;
mds->mdcache->get_ambiguous_import_bounds(base, bounds);
mds->mdcache->adjust_bounded_subtree_auth(dir, bounds, CDIR_AUTH_UNDEF);