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>
crush/CrushWrapper: add get_distance()

Calculate closest common ancestor (type) in the hierarchy.

Signed-off-by: Sage Weil <sage@inktank.com>
crush/CrushWrapper: simplify get_full_location_ordered()

Just ascend the hierarchy; it is much less complicated.

Signed-off-by: Sage Weil <sage@inktank.com>
osdc/Objecter: maintain crush_location multimap

Observe and parse the 'crush location' config option.

Signed-off-by: Sage Weil <sage@inktank.com>
osdc/Objecter: use crush location and distance for LOCALIZE_READS

Use the hierarchy in the CRUSH map to determine what the closest
replica is.

Signed-off-by: Sage Weil <sage@inktank.com>
librbd: localize or distribute parent (snap) reads

The parent is always a snapshot.  We may want to treat it differently
than other snaps by virtue of it (likely) being a more highly-shared
image.

By default, localize parent reads.

Signed-off-by: Sage Weil <sage@inktank.com>
librados: deprecate aio_operate() read variant that takes snapid

The argument was ignored.

Signed-off-by: Sage Weil <sage@inktank.com>
librados: mark old get_version() as deprecated

Use the newly-discovered (for me) deprecated attribute to mark the old
get_version() method and point users toward get_version64().  And fix a
couple of users in the kvstore code!

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