erasure-code: preload the jerasure plugin

Load the jerasure plugin when ceph-osd starts to avoid the following
scenario:

* ceph-osd-v1 is running but did not load jerasure

* ceph-osd-v2 is installed being installed but takes time : the files
  are installed before ceph-osd is restarted

* ceph-osd-v1 is required to handle an erasure coded placement group and
  loads jerasure (the v2 version which is not API compatible)

* ceph-osd-v1 calls the v2 jerasure plugin and does not reference the
  expected part of the code and crashes

Although this problem shows in the context of teuthology, it is unlikely
to happen on a real cluster because it involves upgrading immediately
after installing and running an OSD. Once it is backported to firefly,
it will not even happen in teuthology tests because the upgrade from
firefly to master will use the firefly version including this fix.

While it would be possible to walk the plugin directory and preload
whatever it contains, that would not work for plugins such as jerasure
that load other plugins depending on the CPU features, or even plugins
such as isa which only work on specific CPU.

http://tracker.ceph.com/issues/9153 Fixes: #9153

Backport: firefly
Signed-off-by: Loic Dachary <loic-201408@dachary.org>
Merge pull request #2282 from dachary/wip-9153-jerasure-upgrade

erasure-code: preload the jerasure plugin

Reviewed-by: Sage Weil <sage@redhat.com>
TrackedOp: Removed redundant lock in OpTracker::_mark_event()

ops_in_flight_lock seems redundant in OpTracker::_mark_event()
and this lock is highly contended for. Removing the same
is giving a significant performance boost.

Signed-off-by: Pavan Rallabhandi <pavan.rallabhandi@sandisk.com>
TrackedOp:_dump_op_descriptor is renamed to _dump_op_descriptor_unlocked

Caller don't need to hold lock before calling _dump_op_descriptor(),so,
to reflect this it is renamed to _dump_op_descriptor_unlocked().

Signed-off-by: Pavan Rallabhandi <pavan.rallabhandi@sandisk.com>
Signed-off-by: Somnath Roy <somnath.roy@sandisk.com>
Merge pull request #2219 from somnathr/wip-optracker-lock

TrackedOp: Removed redundant lock in OpTracker::_mark_event()

Reviewed-by: Sage Weil <sage@redhat.com>
erasure-code: do not preload the isa plugin

Because it's not built for all architectures and distributions.

Signed-off-by: Loic Dachary <loic-201408@dachary.org>
Merge pull request #2295 from dachary/wip-9153-jerasure-upgrade

erasure-code: do not preload the isa plugin

Reviewed-by: Sage Weil <sage@redhat.com>
mds: logging in SessionMap

(move definitions to .cc to get it)

Signed-off-by: John Spray <john.spray@redhat.com>
mds: fix crash killing sessions without conn

Bug was introduced in 54eca56695  (mds: use Connection::mark_down()).
Used to call SimpleMessenger::mark_down, which had a check for
connection==NULL, when calling conn->mark_down() we must
now do our own nullness check.

Fixes: #9173

Signed-off-by: John Spray <john.spray@redhat.com>