TrackedOp: remove the init_from_message function

I'm not sure why we ever had this instead of just doing things in the
subclass constructor, and the semantics around it don't make much sense
for anything else (we called mark_event first anyway).

Signed-off-by: Greg Farnum <greg@inktank.com>
TrackedOp: introduce a _dump_op_descriptor function

Use this instead of direct access to the Message underneath when dumping
the TrackedOp.

Signed-off-by: Greg Farnum <greg@inktank.com>
TrackedOp: rename arrived_at to initiated_at, specify when constructed

Instead of relying on the message's get_recv_stamp, take a timestamp
when the TrackedOp is constructed. Rename get_received_at() -> get_initiated().

Signed-off-by: Greg Farnum <greg@inktank.com>
TrackedOp: introduce an _unregistered() function to let implementations clean up

Right now, the OpRequest uses it to clean up Message payload data.

Signed-off-by: Greg Farnum <greg@inktank.com>
TrackedOp: do not track a Message

Give it to the OpRequest (currently, the only TrackedOp implementation).

Signed-off-by: Greg Farnum <greg@inktank.com>
TrackedOp: do not require a Message when creating new Ops

Further parameterize the template to allow passing in an arbitrary parameter,
and move all the Message-based event marking from there into OpRequest.

Signed-off-by: Greg Farnum <greg@inktank.com>
TrackedOp: create an "initiated" event on construction

This ensures we always have an event for state_string().

Signed-off-by: Greg Farnum <greg@inktank.com>
mds: remove a couple leftover declarations of MDRequest

Signed-off-by: Greg Farnum <greg@inktank.com>
MDCache: pass the causative message to request_start_slave()

We were passing the causative MDS (as an int), but pushing down the
actual Message will help us as we set up an OpTracker.

Signed-off-by: Greg Farnum <greg@inktank.com>
MDS: add stubs for an AdminSocketHook

Signed-off-by: Greg Farnum <greg@inktank.com>
Mutation: add an MDRequestParams struct and use that when building MDRequests

We now have a single constructor and one path to build MDRequests with.

Signed-off-by: Greg Farnum <greg@inktank.com>
MDS: add an OpTracker and use it

Signed-off-by: Greg Farnum <greg@inktank.com>
MDCache: mark ops at various finish points

Signed-off-by: Greg Farnum <greg@inktank.com>
Server: mark events when journaling and replying

Signed-off-by: Greg Farnum <greg@inktank.com>
Locker: mark_event in acquire_locks() when blocking or succeeding

Signed-off-by: Greg Farnum <greg@inktank.com>
mds: add a Server::submit_mdlog_entry() to provide event marking

Signed-off-by: Greg Farnum <greg@inktank.com>
Merge remote-tracking branch 'origin/master' into wip-4354-mds-optracker

Conflicts:
	src/mds/Locker.cc
	src/osd/OpRequest.cc
	src/osd/OpRequest.h

Signed-off-by: Greg Farnum <greg@inktank.com>
sample.ceph.conf: minor update

 * Moved filestore settings above [osd.*] declarations otherwise
   (if uncommented) those settings might be applied only to last
   OSD which is not very obvious.
 * Few options added.
Merge pull request #1816 from onlyjob/docs

sample.ceph.conf: minor update

Reviewed-by: Greg Farnum <greg@inktank.com>
OSDMonitor: set next commit in mon primary-affinity reply

Commit 8c5c55c8b47e ("mon: set next commit in mon command replies")
fixed MMonCommand replies to include the right version, but the
primary-affinity handler was authored before that.  Fix it.

Backport: firefly
Signed-off-by: Ilya Dryomov <ilya.dryomov@inktank.com>