OSD: wake_pg_waiters after dropping pg lock

Otherwise, we dispatch_session_waiting while still holding the pg lock,
which is obviously wrong.  Unfortunately, this places an additional
burden on any user of _create_lock_pg, but I think it's unavoidable
since that method must atomically add the pg to the map and lock it.

Fixes: #8961
Introduced in:
  25466839589813047c975e44e67e14f34e32139e
  ecda2fef8ce982df3581a3b47ba74ae581d82479
Signed-off-by: Samuel Just <sam.just@inktank.com>
common/AsyncReserver: add dump()

Signed-off-by: Sage Weil <sage@inktank.com>
osd: add dump_reservations asok command

Allow an admin to inspect pending and in-progress reservations.

Backport: firefly
Signed-off-by: Sage Weil <sage@inktank.com>
OpTracker: use mark_event rather than _mark_event

mark_event() interfaced changed to accept time and it is default
to 'now'. The mark_event is the wrapper function of _mark_event()
and it has the check for optracking enabled/disabled as well.
The _mark_event() is now a private function.

Signed-off-by: Somnath Roy <somnath.roy@sandisk.com>
OpTracker: The optracker enabled/disabled check is added

The optracker enabled/disabled check is now added in the
mark_event(const string&) interface.

Signed-off-by: Somnath Roy <somnath.roy@sandisk.com>
ReplicatedPG: Removed the redundant register_snapset_context call

In the get_object_context(), the get_snapset_context is been called
and the register_snapset_context is already been invoked from there.
This call seems to be redundant.

Signed-off-by: Somnath Roy <somnath.roy@sandisk.com>
OSD: adjust share_map() to handle the case that the osd is down

The assert was hitting while OSd is waiting for becoming healthy
in handle_osd_map(). This can happen while io is going on and
OSDs are made down forcefully by say osd thrash command.
So, the fix could be instead of asserting just return from here.

Fixes: #8646

Signed-off-by: Somnath Roy <somnath.roy@sandisk.com>
[werror] Fix c++11-compat-reserved-user-defined-literal

c++11 readiness, avoid clash with
http://www.stroustrup.com/C++11FAQ.html#UD-literals

Signed-off-by: Thorsten Behrens <tbehrens@suse.com>
Automagically setup submodules on first run.

I mean, who's reading the README, anyway?

Signed-off-by: Thorsten Behrens <tbehrens@suse.com>
Merge pull request #2063 from athanatos/wip-8691

OSD: wake_pg_waiters after dropping pg lock

Reviewed-by: Greg Farnum <greg@inktank.com>
Merge pull request #2065 from somnathr/wip-sd-optracker

Pull request for optracker changes

Reviewed-by: Samuel Just <sam.just@inktank.com>
Merge pull request #2064 from somnathr/wip-sd-share-map

OSD: adjust share_map() to handle the case that the osd is down

Reviewed-by: Samuel Just <sam.just@inktank.com>
Merge pull request #2062 from somnathr/wip-sd-replicated-pg

ReplicatedPG: Removed the redundant register_snapset_context call

Reviewed-by: Samuel Just <sam.just@inktank.com>
Merge pull request #2066 from thorstenb/wip-janitorial-clang-2

[werror] Fix c++11-compat-reserved-user-defined-literal
Merge pull request #2069 from thorstenb/thb-buildconvenience-1

Automagically setup submodules on first run.

Reviewed-by: Sage Weil <sage@redhat.com>
Merge pull request #2059 from ceph/wip-osd-dumpres

osd: allow dumping reservation state via asok

Reviewed-by: Samuel Just <sam.just@inktank.com>