mon/MonClient: constify inbl command args

Signed-off-by: Sage Weil <sage@inktank.com>
Reviewed-by: Greg Farnum <greg@inktank.com>
osdc/Objecter: constify inbl command args

Signed-off-by: Sage Weil <sage@inktank.com>
Reviewed-by: Greg Farnum <greg@inktank.com>
librados: constify inbl command args

Signed-off-by: Sage Weil <sage@inktank.com>
Reviewed-by: Greg Farnum <greg@inktank.com>
librados: document aio_flush()

Signed-off-by: Sage Weil <sage@inktank.com>
Reviewed-by: Greg Farnum <greg@inktank.com>
librados: add mon_command to C++ API

This way librados users can execute monitor commands.

Signed-off-by: Sage Weil <sage@inktank.com>
Reviewed-by: Greg Farnum <greg@inktank.com>
osd/osd_types: add explicit hash to object_locator_t

Instead of hashing the object name or key, we allow the hash position to be
provided explicitly.

Signed-off-by: Sage Weil <sage@inktank.com>
Signed-off-by: Greg Farnum <greg@inktank.com>
osd/OSDMap: use new object_locator_t::hash to place object in a pg

The hash value, if provided, becomes the ps (placement seed) portion of the
pg_t, skipping any hashing of the object name (or locator key).

Signed-off-by: Sage Weil <sage@inktank.com>
Reviewed-by: Greg Farnum <greg@inktank.com>
osd: capture hashing of objects to hash positions/pgs in pg_pool_t

The hashing is dependent on pool properties; capture (more of) it in a
method instead of having it in OSDMap.

Signed-off-by: Sage Weil <sage@inktank.com>
Reviewed-by: Greg Farnum <greg@inktank.com>
osdc/Objecter: expose methods for getting object hash position and pg

Signed-off-by: Sage Weil <sage@inktank.com>
Reviewed-by: Greg Farnum <greg@inktank.com>
librados: expose methods for calculating object hash position

Signed-off-by: Sage Weil <sage@inktank.com>
Reviewed-by: Greg Farnum <greg@inktank.com>
librados: add wait_for_latest_osdmap()

There are times when users may need to make sure the client has the
latest osdmap, for example after sending a mon command modifying
pool properties.

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

squash "librados: add wait_for_latest_osdmap()"
osd/PG: factor out get_next_version()

Signed-off-by: Sage Weil <sage@inktank.com>
Signed-off-by: Greg Farnum <greg@inktank.com>
osd/ReplicatedPG: factor out simple_repop_{create,submit} helpers

This makes it easier to create repops correctly, and should help
prevent bugs like the one we remove here in process_copy_op (we were
serializing on the wrong object!)

Signed-off-by: Sage Weil <sage@inktank.com>
Signed-off-by: Greg Farnum <greg@inktank.com>
osd_types: add generic HitSet type with bloom and explicit implementations

Track a set of hash values, either explicitly or using a bloom_filter. Hide
the implementation and allow us to transparently encode and decode.

Signed-off-by: Sage Weil <sage@inktank.com>
osd/osd_types: add pg_hit_set_{info,history}_t

Signed-off-by: Sage Weil <sage@inktank.com>
osd/osd_types: include pg_hit_set_history_t in pg_info_t

Track metadata about the currently accumulating HitSet as well as
previously archived ones in the pg_info_t.  This will not scale well for
extremely long histories, but does let us avoid explicitly sharing this
metadata during recovery or other normal update activity.

Signed-off-by: Sage Weil <sage@inktank.com>
librados: move dirty/undirty test to new ceph_test_rados_api_tier target

Signed-off-by: Sage Weil <sage@inktank.com>
mon/OSDMonitor: set hit_set fields

Signed-off-by: Sage Weil <sage@inktank.com>
osd: add hit_set_* parameters to pg_pool_t

Add pool properties to control what type of HitSet we want to use, along with
some (mostly generic) parameters.

Signed-off-by: Sage Weil <sage@inktank.com>
osd/ReplicatedPG: add basic HitSet tracking

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