osd: noscrub, nodeepscrub osdmap flags

Just add NOSCRUB/NODEEP_SCRUB to OSDMap flags and  allow set/unset

Feature: #4135

Signed-off-by: David Zafman <david.zafman@inktank.com>
librados: fix installed header include paths

Avoid referencing non-installed header deps.

Signed-off-by: Noah Watkins <noahwatkins@gmail.com>
Add code to check flag state

Signed-off-by: David Zafman <david.zafman@inktank.com>
debian: Fix FTBFS because depend on old libboost-dev

Signed-off-by: Andras Elso <elso.andras@gmail.com>
mon/MonMap: don't crash on dup IP in mon host

If the mon_host line has an IP twice, we shouldn't crash.

Signed-off-by: Sage Weil <sage@inktank.com>
mds/Locker.cc: use static_cast instead of C-Style cast

Signed-off-by: Danny Al-Gaaf <danny.al-gaaf@bisect.de>
mds/Locker.cc: fix warning about 'Possible null pointer dereference'

Fix following warning from cppcheck:
 [src/mds/Locker.cc:2255] -> [src/mds/Locker.cc:2258]: (error)
   Possible null pointer dereference: in - otherwise it is redundant
   to check it against null.

Since head_in used for call pick_inode_snap() is already valid,
there is no need to check if 'CInode *in' is not NULL. Remove
not needed check.

Signed-off-by: Danny Al-Gaaf <danny.al-gaaf@bisect.de>
fusetrace_ll.cc: reduce scope of 'int err' in main()

Signed-off-by: Danny Al-Gaaf <danny.al-gaaf@bisect.de>
SyntheticClient.cc: Clarify calculation precedence for '%' and '?'

Signed-off-by: Danny Al-Gaaf <danny.al-gaaf@bisect.de>
librbd/internal.cc: clarify expression with parentheses

From cppcheck:
 [src/librbd/internal.cc:379]: (style) Boolean result is used in
 bitwise operation. Clarify expression with parentheses.
mon/Monitor.cc: Clarify calculation precedence for '%' and '?'

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

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

Signed-off-by: Danny Al-Gaaf <danny.al-gaaf@bisect.de>
os/FileStore.cc: remove assignment of a never used value

There is no need to set local variable basedir_fd to -1 after
closing and right before leaving the function.

Signed-off-by: Danny Al-Gaaf <danny.al-gaaf@bisect.de>
os/FileStore.cc: move variable async_done to the right #ifdef block

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

Signed-off-by: Danny Al-Gaaf <danny.al-gaaf@bisect.de>
osdc/ObjectCacher.cc: set left to 0 instead off 'left -= left'

Instead of call 'left -= left', which results in 0, set left directly
to 0 and remove not needed assert call 'left == 0'.

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

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

Signed-off-by: Danny Al-Gaaf <danny.al-gaaf@bisect.de>
src/rados.cc: remove unused variable

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