From: Sage Weil Date: Fri, 17 May 2013 19:06:18 +0000 (-0700) Subject: client: add debugging around traceless reply failures X-Git-Tag: v0.81~19^2~12 X-Git-Url: http://git-server-git.apps.pok.os.sepia.ceph.com/?a=commitdiff_plain;h=cc65c39272ad521f452b887ce1026ba73c5dfc76;p=ceph.git client: add debugging around traceless reply failures Tracking down #5021 Signed-off-by: Sage Weil --- diff --git a/src/client/Client.cc b/src/client/Client.cc index 6e46d6da7512..569f2e4842e0 100644 --- a/src/client/Client.cc +++ b/src/client/Client.cc @@ -1260,18 +1260,25 @@ int Client::verify_reply_trace(int r, Inode *target = 0; // ptarget may be NULL Dentry *d = request->dentry(); if (d) { - // rename is special: we handle old_dentry unlink explicitly in insert_dentry_inode(), so - // we need to compensate and do the same here. + // rename is special: we handle old_dentry unlink explicitly + // in insert_dentry_inode(), so we need to compensate and do + // the same here. Dentry *od = request->old_dentry(); if (od) { unlink(od, false); } - ldout(cct, 10) << "make_request got traceless reply, looking up #" - << d->dir->parent_inode->ino << "/" << d->name - << " got_ino " << got_created_ino - << " ino " << created_ino - << dendl; - r = _do_lookup(d->dir->parent_inode, d->name, &target); + + if (d->dir) { + ldout(cct, 10) << "make_request got traceless reply, looking up #" + << d->dir->parent_inode->ino << "/" << d->name + << " got_ino " << got_created_ino + << " ino " << created_ino + << dendl; + r = _do_lookup(d->dir->parent_inode, d->name, &target); + } else { + // if the dentry is not linked, just do our best. see #5021. + assert(0 == "how did this happen? i want logs!"); + } } else { Inode *in = request->inode(); ldout(cct, 10) << "make_request got traceless reply, forcing getattr on #"