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
crushtool.cc: remove unneeded function declaration

Remove unneeded function declarations (data_analysis() is unused and
usage() is not needed).

Signed-off-by: Danny Al-Gaaf <danny.al-gaaf@bisect.de>
CephxProtocol.cc: catch error by reference

Follow 'Throw by value, catch by reference' to void copying and
potential slicing the exception.

Signed-off-by: Danny Al-Gaaf <danny.al-gaaf@bisect.de>
CephxProtocol.cc: catch end_of_buffer by reference

Follow 'Throw by value, catch by reference' to void copying and
potential slicing the exception.

Signed-off-by: Danny Al-Gaaf <danny.al-gaaf@bisect.de>
Client.cc: add parenthesis around expression

Add parenthesis around expressions like (x && y & z).

Signed-off-by: Danny Al-Gaaf <danny.al-gaaf@bisect.de>
PGMonitor.cc: add parenthesis around expression

Add parenthesis around expressions like (x && y & z).

Signed-off-by: Danny Al-Gaaf <danny.al-gaaf@bisect.de>
OSDMap.cc: add parenthesis around expression

Add parenthesis around expressions like (x && y & z).

Signed-off-by: Danny Al-Gaaf <danny.al-gaaf@bisect.de>
osd_types.cc: add parenthesis around expression

Add parenthesis around expressions like (x && y & z).

Signed-off-by: Danny Al-Gaaf <danny.al-gaaf@bisect.de>
osd/ReplicatedPG.cc: remove unused variables

Remove unused variable declarations.

Signed-off-by: Danny Al-Gaaf <danny.al-gaaf@bisect.de>
Paxos.h: pass string name function parameter by reference

Pass 'const string name' function parameter by reference.

Signed-off-by: Danny Al-Gaaf <danny.al-gaaf@bisect.de>
Client.cc: use static_cast instead of C-Style cast

Use static_cast<T>() instead of C-Style cast.

Signed-off-by: Danny Al-Gaaf <danny.al-gaaf@bisect.de>
Client.cc: reduce the scope of some variables

Reduce the scope of some variables.

Signed-off-by: Danny Al-Gaaf <danny.al-gaaf@bisect.de>
CephBroker.cc: fix condition

from cppcheck:
 Fix Suspicious condition (assignment + comparison); Clarify
 expression with parentheses.

Signed-off-by: Danny Al-Gaaf <danny.al-gaaf@bisect.de>
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>