client: handle traceless replies from make_request()

Modify the generic make_request wrapper to retry lookups or getattrs on
requests when the ptarget pointer is specified but there is no trace in
the reply.

Refactor the _create() method to use this, effectively moving all of the
extra_bl code processing into make_request where it is generically
useful.

Signed-off-by: Sage Weil <sage@inktank.com>
client: pass ptarget from link, create, mkdir, symlink, setattr

Use the new make_request functionality to ensure that we properly handle
the re-lookup/getattr when we get a traceless reply back from the MDS.

Note that we have to do this on setattr() because ll_getattr() expects to
return the updated inode metadata to the caller.

Signed-off-by: Sage Weil <sage@inktank.com>
client: clear I_COMPLETE on traceless reply for dentry request

If a request is against a dentry, and we get a traceless reply, clear
the directory I_COMPLETE flag on the parent directory because we can no
longer trust that our cache is complete.

It is possible we could do something a bit more intelligent here, but it
is not trivial because of racing requests, and traceless replies are
rare, so it's not worth the effort.

Signed-off-by: Sage Weil <sage@inktank.com>
client: root can write to any file

Signed-off-by: Sage Weil <sage@inktank.com>
client: handle fh cleanup in ll_create() failure path

Release the gh if we fail the permissions check.

Signed-off-by: Sage Weil <sage@inktank.com>
mds: do not do traceless reply for open O_TRUNC requests

Even though these are "may_write" and may be a mutation, the MDS should not
fake out a traceless reply.  In a real failure, it looks like:

 - mds process request (mutation)
 - mds fails
 - client resends request
 - mds notes that it is O_TRUNC, and already committed, and proceeds with
   a regular open

And that is all fine.

But, that means that if we are trying to simulate this behavior without a
failure, then we should never do a traceless reply on an O_TRUNC request,
because the client will never see such a reply--it'll get a full open
request response instead.

Signed-off-by: Sage Weil <sage@inktank.com>
client: make _do_lookup take a const string

Signed-off-by: Sage Weil <sage@inktank.com>
client: force lookup on traceless reply

Call _do_lookup directly so that we avoid hitting the cache

Signed-off-by: Sage Weil <sage@inktank.com>
client: unlink old_dentry on traceless rename reply

Signed-off-by: Sage Weil <sage@inktank.com>