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>
PG::start_peering_interval: use check_new_interval for same_interval_since

Signed-off-by: Samuel Just <sam.just@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>
OSD: verify that client ops are targeted correctly in the current epoch

We were previously only looking at the epoch the op was sent in, which meant
that if we had dropped responsibility somewhere between send_epoch and our
current epoch, we would queue up the op until a new osdmap came along. If it
never did, we could block all client IO against us...

Fixes: #8338

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>
osd_types: factor out is_new_interval from check_new_interval

Signed-off-by: Samuel Just <sam.just@inktank.com>