ReplicatedPG::C_OSD_CommittedPushedObject take epoch submitted

What we really care about is that the epoch in which the Context
was submitted is at complete() time >= last_peering_reset.

Signed-off-by: Samuel Just <sam.just@inktank.com>
ReplicatedPG::C_OSD_CommittedPushedObject: use intrusive_ptr for pg

Signed-off-by: Samuel Just <sam.just@inktank.com>
PG::build_scrub_map: detect race with peering via last_peering_reset

Signed-off-by: Samuel Just <sam.just@inktank.com>
PG,ReplicatedPG: use pg_has_reset_since to discard old async events

Local async events are obsolete if the pg is deleting or if the
epoch at which they were created is prior to last_peering_reset.

Signed-off-by: Samuel Just <sam.just@inktank.com>
systest: fix race with pool deletion

The second test have pool deletion and object listing wait on the same
semaphore to connect and start. This led to errors sometimes when the
pool was deleted before it could be opened by the listing process. Add
another semaphore so the pool deletion happens only after the listing
has begun.

Fixes: #4147
Signed-off-by: Josh Durgin <josh.durgin@inktank.com>
(cherry picked from commit b0271e390564119e998e18189282252d54f75eb6)
systest: restrict list error acceptance

Only ignore errors after the midway point if the midway_sem_post is
defined.

Signed-off-by: Josh Durgin <josh.durgin@inktank.com>
(cherry picked from commit 5b24a68b6e7d57bac688021b822fb2f73494c3e9)
Merge remote-tracking branch 'gh/wip-4249' into next
ceph.spec.in:  Create placeholder directorys under /var/lib/ceph (Bug 4119)

Signed-off-by: Gary Lowell  <gary.lowell@inktank.com>
Typo: pool should be root in rados/operations/crush-map.rst

Signed-off-by: Alexandre Marangone <alexandre.marangone@inktank.com>
Merge pull request #75 from alram/master

Typo: pool should be root in rados/operations/crush-map.rst

Reviewed-by: Sage Weil <sage@inktank.com>
test: updating libcephfs-java tests

Recent changes in teuthology necessitate
changes to libcephfs-java test case.

Signed-off-by: Joe Buck <jbbuck@gmail.com>
test: removing dead code

Signed-off-by: Joe Buck <jbbuck@gmail.com>
testing: updating hadoop-internal test

Small tweaks to the hadoop-internal test
to better use existing environment varaibles
and in response to the recent teuthology
changes.

Signed-off-by: Joe Buck <jbbuck@gmail.com>
Reviewed-by: Noah Watkins <noahwatkins@gmail.com>
Merge branch 'wip-4119'

Fix for bug 4119r, create directories under /var/lib/ceph.
ceph_common.sh: tolerate missing mds, mon, osds in conf

With set -e this seems to fail (at least on some machines) if, say, there
is no MDS in the conf file.  This fixes it.

Tested-by: Mark Nelson <mark.nelson@inktank.com>
Signed-off-by: Sage Weil <sage@inktank.com>
mon: avoid expensive dump unless log will gather

Signed-off-by: Sage Weil <sage@inktank.com>
Merge remote-tracking branch 'gh/wip_4257'

Reviewed-by: Sage Weil <sage@inktank.com>
osd: allow pg log trim during (non-classic) scrub

Chunky (and deep) scrub do not care about PG log trimming.  Classic scrub
still does.

Deep scrub can take a long time, so not trimming the log during that period
may eat lots of RAM; avoid that!

Might fix: #4179
Signed-off-by: Sage Weil <sage@inktank.com>
Reviewed-by: Samuel Just <sam.just@inktank.com>
osd: restructure calc_trim

No functional change, except that we log more debug, yay!

Signed-off-by: Sage Weil <sage@inktank.com>
Reviewed-by: Samuel Just <sam.just@inktank.com>
osd: allow (some) log trim when degraded, but not during recovery

We allow some trim during degraded, although we keep more entries around to
improve our chances of a restarting OSD of doing log-based recovery.

Still disallow during recovery...

Signed-off-by: Sage Weil <sage@inktank.com>
Reviewed-by: Samuel Just <sam.just@inktank.com>