client: use put_inode on MetaRequest inode refs

When we drop the request inode refs, we need to use put_inode() to ensure
they get cleaned up properly (removed from inode_map, caps released, etc.).
Do this explicitly here (as we do with all other inode put() paths that
matter).

Fixes: #5381
Backport: cuttlefish
Signed-off-by: Sage Weil <sage@inktank.com>
librados: fix cmd OSDCommand test

If we get ENXIO, buflen will be 0.

Signed-off-by: Sage Weil <sage@inktank.com>
client: fix remaining Inode::put() caller, and make method psuedo-private

Not sure I can make this actually private and make Client::put_inode() a
friend method (making all of Client a friend would defeat the purpose).
This works well enough, though!

Signed-off-by: Sage Weil <sage@inktank.com>
client: send all request put's through put_request()

Make sure all MetaRequest reference put's go through the same path that
releases inode references, including all of the error paths.

Signed-off-by: Sage Weil <sage@inktank.com>
Merge remote-tracking branch 'gh/wip-5381' into wip-mds

Reviewed-by: Greg Farnum <greg@inktank.com>
osd/PGLog: populate log_keys_debug from read_old_log()

Fixes: #5470
Signed-off-by: Sage Weil <sage@inktank.com>
Reviewed-by: Samuel Just <sam.just@inktank.com>
rgw: add RGWFormatter_Plain allocation to sidestep cranky strlen()

Valgrind complains about an invalid read when we don't pad the allocation,
and because it is inlined we can't whitelist it for valgrind.  Workaround
the warning by just padding our allocations a bit.

Fixes: #5346
Backport: cuttlefish
Signed-off-by: Sage Weil <sage@inktank.com>
Merge pull request #387 from ceph/wip-5346

rgw: add RGWFormatter_Plain allocation to sidestep cranky strlen()

Reviewed-by: Yehuda Sadeh <yehuda@inktank.com>
osdc/Objecter: resend command map version checks on reconnect

We already do this for Ops and LingerOps, but missed this when we added
CommandOps to the mix.  The result is that an ill-timed mon disconnect will
leave a command map check (and thus the command) hanging.

This misbehavior was introduced when CommandOp was introduced, back in
commit 2e172225b01561bb7988b6d86d96ff4b9c1c5762, and we failed to fix it
in 8808ca57c652502d9cf803b0dc53673ca9dd62af.

Fixes: #5493
Signed-off-by: Sage Weil <sage@inktank.com>
Reviewed-by: Josh Durgin <josh.durgin@inktank.com>
sysvinit, upstart: handle symlinks to dirs in /var/lib/ceph/*

Match a symlink to a dir, not just dirs.  This fixes the osd case of e.g.,
creating an osd in /data/osd$id in which ceph-disk makes a symlink from
/var/lib/ceph/osd/ceph-$id.

Fix proposed by Matt Thompson <matt.thompson@mandiant.com>; extended to
include the upstart users too.

Fixes: #5490
Signed-off-by: Sage Weil <sage@inktank.com>
Reviewed-by: Dan Mick <dan.mick@inktank.com>
mon: dead code removal

Remove code for 'mds cluster_fail', 'osd tell', and auth_usage()

Signed-off-by: Dan Mick <dan.mick@inktank.com>
Reviewed-by: Sage Weil <sage@inktank.com>
Merge remote-tracking branch 'gh/next'

Conflicts:
	src/mon/OSDMonitor.cc