Merge pull request #609 from dmick/wip-6293

mon: fix wrong arg to "instructed to" status message

Reviewed-by: David Zafman <david.zafman@inktank.com>
OpRequest: remove obsolete comment about ref-counting (use OpRequestRef!)

Signed-off-by: Greg Farnum <greg@inktank.com>
OpTracker: start making the OpTracker into a generic

We're starting by templating the create_request function and having
the OpTracker work in terms of TrackedOp[Ref]s intead of
OpRequest[Ref]s. This involves moving a bunch of stuff into the
base-class TrackedOp.

Signed-off-by: Greg Farnum <greg@inktank.com>
OpTracker: add an init_from_message() to the TrackedOp interface

This can be used for the concrete implementations to gather any
extra data out of the message and do whatever extra setup based
on that they want. The OpTracker will call this after doing all its
internal setup but before anybody else gets to see the TrackedOp.

Signed-off-by: Greg Farnum <greg@inktank.com>
OpTracker: move the OpTracker and OpHistory into common/TrackedOp.[h|cc]

Signed-off-by: Greg Farnum <greg@inktank.com>
OpTracker: remove the references to "osd" in config variables

We may want to have daemon-specific settings in the future, but that
will be a small interface change and in the mean time this keeps a clear
demarcation between OSD and OpTracker infrastructure.

Signed-off-by: Greg Farnum <greg@inktank.com>
OpTracker: move OpTracker pointer and some init code into TrackedOp

Clean up some member privacy issues while we're working on them.

Signed-off-by: Greg Farnum <greg@inktank.com>
osd: change how we work around an interface limitation.

If this had ever actually been triggered we would have hit an assert
in the OpRequest destructor that op->request is non-NULL.

Signed-off-by: Greg Farnum <greg@inktank.com>
OpTracker: include a destructor for the TrackedOp base class.

Our method of handling the OpRequest destructor is a little weird,
but we're about to get rid of the request member finagling.

Signed-off-by: Greg Farnum <greg@inktank.com>
osd: use TrackedOp::get_req() instead of direct access to the request.

Signed-off-by: Greg Farnum <greg@inktank.com>
OpTracker: provide a default implementation of TrackedOp::state_string

We're moving towards dynamically-allocated states instead of the static
ones this started with, so the whole bitmask-based thing doesn't make
much sense any more. Assume people won't use that and provide a default.

Signed-off-by: Greg Farnum <greg@inktank.com>
OpTracker: demand that a TrackedOp gets to own its Message for life.

Signed-off-by: Greg Farnum <greg@inktank.com>
OpTracker: get rid of TrackedOp::received_time for the Message

Signed-off-by: Greg Farnum <greg@inktank.com>
Makefile: add extra cls DENCODER_DEPS in the cls makefile, not rgw

They belong next to the class.  Also, if rgw isn't built, ceph-dencoder
will fail to link.

Fixes: #6352
Tested-by: Haomai Wang <haomaiwang@gmail.com>
Signed-off-by: Sage Weil <sage@inktank.com>
Merge pull request #590 from ceph/wip-6284

osdc/ObjectCacher: finish contexts after dropping object reference

Tested: ubuntu@teuthology:/a/sage-2013-09-19_19:40:56-fs-wip-6284-testing-basic-plana
Reviewed-by: Sage Weil <sage@inktank.com>
bufferlist: don't use list::size()

Reviewed-by: Sage Weil <sage@inktank.com>
Signed-off-by: Yehuda Sadeh <yehuda@inktank.com>
common/lru_map: rename tokens to entries

This code was originally used in a token cache, now
as a generic infrastructure rename token fields.

Reviewed-by: Sage Weil <sage@inktank.com>
Signed-off-by: Yehuda Sadeh <yehuda@inktank.com>
lru_map: don't use list::size()

replace list::size() with map::size(), which should have
a constant time complexity.

Reviewed-by: Sage Weil <sage@inktank.com>
Signed-off-by: Yehuda Sadeh <yehuda@inktank.com>
FileStore: only remove the omap entries if nlink == 1

Fixes: #6359
Introduced in 17c5d765d7c7573f875f6b3ba66e3b6813110a06
Signed-off-by: Samuel Just <sam.just@inktank.com>
Reviewed-by: Sage Weil <sage@inktank.com>
perfglue/heap_profiler.cc: expect args as first element on cmd vector

We used to pass 'heap' as the first element of the cmd vector when
handling commands.  We haven't been doing so for a while now, so we
needed to fix this.

Not expecting 'heap' also makes sense, considering that what we need to
know when we reach this function is what command we should handle, and
we should not care what the caller calls us when handling his business.

Fixes: #6361
Backport: dumpling

Signed-off-by: Joao Eduardo Luis <jecluis@gmail.com>