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>
atomic_t: add atomic64_t

Signed-off-by: Yehuda Sadeh <yehuda@inktank.com>
common/perf_counters: use atomics instead of a mutex

The mutex is way too expensive.

Signed-off-by: Sage Weil <sage@inktank.com>
mon: remember osd weight when auto-marking osds out

If we automatically mark an OSD out, remember its OSD weight.

Signed-off-by: Sage Weil <sage@inktank.com>
mon: restore previous weight when auto-marked out osd boots

When an OSD that was marked out boots, restore the weight it had before.

Signed-off-by: Sage Weil <sage@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>