crush/mapper: unsigned -> unsigned int

Kernel implementation is located in net/, and use of "unsigned int" is
preferred to bare "unsigned" in net tree (as proven by several net/
cleanups).  Follow this guideline to shrink the diff.

Signed-off-by: Ilya Dryomov <ilya.dryomov@inktank.com>
crush: use kernel-doc consistently

kernel-doc syntax is "@arg: desc", not "@param arg desc".  In addition,
these comments are usually placed around function definitions instead
of function declarations.  Follow these guidelines to shrink the diff.

Signed-off-by: Ilya Dryomov <ilya.dryomov@inktank.com>
crush: misc formatting and whitespace fixes

- whitespace in crush.h

- format is_out() definition and call site to 80 columns

- whitespace around local_fallback_tries in crush_choose_firstn()

All of this is to shrink the diff with the kernel implementation.

Signed-off-by: Ilya Dryomov <ilya.dryomov@inktank.com>
Merge pull request #987 from ceph/wip-crush-shrink-diff

crush: shrink diff with kernel implementation

Reviewed-by: Sage Weil <sage@inktank.com>
Merge remote-tracking branch 'gh/wip-cache'
Merge remote-tracking branch 'gh/next'
Merge pull request #984 from ceph/wip-7051

#7051: forward connection features alongside with message

Reviewed-by: Loic Dachary <loic@dachary.org>
Reviewed-by: Sage Weil <sage@inktank.com>
osd/ReplicatedPG: include omap header in copy-get

Missed this the first time around.  Thank you, ceph_test_rados!

Fixes: #7056
Signed-off-by: Sage Weil <sage@inktank.com>
mon: fix forwarded request features when requests are resent

Pass the features in explicitly so that we can use messages we've just
decoded in resend_routed_requests().

Keep the features in struct RoutedRequest.

Renamed conn_features -> con_features while we are here.

Signed-off-by: Sage Weil <sage@inktank.com>
doc: Fix caps documentation for Admin API

The correct caps is users instead of user
config: add 'crush location' option

Signed-off-by: Sage Weil <sage@inktank.com>
vstart/stop: do not loop forever on kill

It may be the case that stop.sh can't stop a process for reasons
unrelated to vstart.sh. Because apache runs independantly, for
instance. Instead of trying forever, try twice in a raw ( should be
enough 99% of the case ) and try three more times, sleeping one second
between each try should be more than enough.

Signed-off-by: Loic Dachary <loic@dachary.org>
ceph_test_rados: s/tmap/omap/

Signed-off-by: Sage Weil <sage@inktank.com>
osd/ReplicatedPG: fix copy-get iteration of omap keys

We need to call upper_bound() before checking if the iterator is valid!

Signed-off-by: Sage Weil <sage@inktank.com>
Merge pull request #991 from dachary/wip-stop

vstart/stop: do not loop forever on kill

Reviewed-by: Sage Weil <sage@inktank.com>
crush/CrushWrapper: add parse_loc_[multi]map helpers

Signed-off-by: Sage Weil <sage@inktank.com>
mon/OSDMonitor: use generic CrushWrapper::parse_loc_map helper

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

osd/ReplicatedPG: include omap header in copy-get

This now passes rados/thrash tests without failures.
Merge pull request #990 from ceph/wip-fix-mon-fwd

mon: fix forwarded request features when requests are resent

Reviewed-by: Joao Eduardo Luis <joao.luis@inktank.com>
crush/CrushWrapper: add get_common_ancestor_distance()

Calculate closest common ancestor (type) in the hierarchy.

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