filestore: add debug option to verify split results

Signed-off-by: Samuel Just <sam.just@inktank.com>
OSD: add debugging to start_split and complete_split

Signed-off-by: Samuel Just <sam.just@inktank.com>
PG::read_log: fix assert, split may introduce holes in the log

Signed-off-by: Samuel Just <sam.just@inktank.com>
osd_internals/snaps.rst: add a description of snaps and trimming

Signed-off-by: Samuel Just <sam.just@inktank.com>
osd_internals/snaps.rst: update description to reflect SnapMapper

Signed-off-by: Samuel Just <sam.just@inktank.com>
ObjectStore: move queue_transaction into ObjectStore

This will simplify the SnapMapper implementation.

Signed-off-by: Samuel Just <sam.just@inktank.com>
Context: allow C_Contexts to not have a cct, add list_to_context

This will simplify the SnapMapper implementation.

Signed-off-by: Samuel Just <sam.just@inktank.com>
ObjectStore: add Context management to Transaction

ObjectStore now appends passed contexts in queue_transaction
to the Transaction contexts and uses that to pass into
the virtual queue_transactions.

Signed-off-by: Samuel Just <sam.just@inktank.com>
DBObjectMap, hobject: add helpers for pgid bit matching

Create helpers in hobject for generating prefixes for a
pg as well as matching hobjects against a pgid/numpgs
combo.  Use these in HashIndex.cc.

Signed-off-by: Samuel Just <sam.just@inktank.com>
common/shared_ptr.hpp: add get_next and expose VPtr and WeakVPtr types

Signed-off-by: Samuel Just <sam.just@inktank.com>
common/: add map_cacher

Signed-off-by: Samuel Just <sam.just@inktank.com>
osd/: add SnapMapper

Signed-off-by: Samuel Just <sam.just@inktank.com>
test/: add tests for map_cacher

Signed-off-by: Samuel Just <sam.just@inktank.com>
Makefile: add SnapMapper to osd

Signed-off-by: Samuel Just <sam.just@inktank.com>
osd/: Integrate SnapMapper with OSD

- SnapTrimmer now uses SnapMapper to get the next object to trim
- Entries for a snap are implicitely removed from SnapMapper when
the last object is trimmed, so no need for the adjust_local_snaps
logic.
- Scrub now compares the object_info snaps set on the object attr
with the version stored in the SnapMapper.

Signed-off-by: Samuel Just <sam.just@inktank.com>
OSD,PG: add upgrade procedure for snap_mapper

Also, sub_op_modify transactions currently carry the operations
for creating snap links in the shipped transaction.  To handle
ops shipped by unenlightened osds, transactions can now be
tagged with a tolerate_collection_add_enoent flag.

Signed-off-by: Samuel Just <sam.just@inktank.com>
PG: check and repair snap_mapper entries during scrub

Signed-off-by: Samuel Just <sam.just@inktank.com>
OSD: remove snap_mapper entries in RemoveWQ

This is a somewhat ugly hack for now until we implement
pg resurrection.

Signed-off-by: Samuel Just <sam.just@inktank.com>