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>
msg: fix entity_addr_t::is_same_host() for IPv6

We weren't checking the memcmp return value properly!  Aie...

Backport: bobtail
Signed-off-by: Sage Weil <sage@inktank.com>
librbd: fix rollback size

The duplicate calls to get_image_size() and get_snap_size() replaced
by 5806226cf0743bb44eaf7bc815897c6846d43233 uncovered this. The first
call was using the currently set snap_id instead of the snapshot being
rolled back to.

Fixes: #4272
Signed-off-by: Josh Durgin <josh.durgin@inktank.com>
Reviewed-by: Sage Weil <sage@inktank.com>
mon: Paxos: bootstrap if we have fallen behind when we start collecting

Fixes: #4256

Signed-off-by: Joao Eduardo Luis <joao.luis@inktank.com>
Reviewed-by: Sage Weil <sage@inktank.com>
mon: Monitor: adjust sync start criteria considering a peon's bootstrap

Signed-off-by: Joao Eduardo Luis <joao.luis@inktank.com>
mon: Monitor: check for an argument to 'quorum' before reading the array

Fixes: #4218

Signed-off-by: Joao Eduardo Luis <joao.luis@inktank.com>
mon: give useful errors to user when store is missing

We used to assert() instead, which didn't shed enough light on the cause
and could confuse the user into believing something *terrible* had
happened.

Signed-off-by: Joao Eduardo Luis <joao.luis@inktank.com>
PendingReleaseNotes: mention ceph-mon requiring the creation of data dir

Signed-off-by: Joao Eduardo Luis <joao.luis@inktank.com>
Merge remote-tracking branch 'gh/wip-4256'

Reviewed-by: Sage Weil <sage@inktank.com>