OSDMap: bump snap_epoch when adding a tier

When we make an existing pool a tier, we start copying the snap metadata
from the base tier.  That includes removed_snaps.  In order for the OSD
to recognize that this value is changing for the first time, we need to
set snap_epoch, or else the OSD doesn't update it's in-memory PGPool
with removed snaps and we eventually hit an assertion failure because
PGPool::cached_remove_snaps is incorrect (e.g., empty).

Fix this by bumping snap_epoch when we add the new tier.

Fixes: #7915
Signed-off-by: Sage Weil <sage@inktank.com>
Merge pull request #1591 from ceph/wip-7915

mon: bump snap_epoch when adding a tier (fixes 7915)

Reviewed-by: Samuel Just <sam.just@inktank.com>
lockdep: do not initialize if already started

If we have already registered a cct for lockdep, do not accept another one.
We already check that the cct matches when we shut down.  This we will run
for the life span of a single cct and no longer.

Fixes: #7965
Signed-off-by: Sage Weil <sage@inktank.com>
lockdep: reset state on shutdown

If we shut down, clear out all of the lockdep state.  This ensures that if
we start up again on another cct, we will not be confused by old type ids
and dependency state.

Possibly contributed to #7965.

Signed-off-by: Sage Weil <sage@inktank.com>
Merge pull request #1592 from ceph/wip-7965

lockdep: fix when instantiated multiple times (bug 7965)

Reviewed-by: Josh Durgin <josh.durgin@inktank.com>
ReplicatedPG::agent_maybe_evict: adjust stats

Fixes: #7964
Signed-off-by: Samuel Just <sam.just@inktank.com>
Merge remote-tracking branches 'origin/wip-sam-testing2', 'upstream/wip-7659', 'origin/wip-7904', 'origin/wip-7916', 'origin/wip-7942' and 'origin/wip-7964' into wip-sam-testing