osd/osd_types: drop old pref arg to pg_t ctor less

Signed-off-by: Sage Weil <sage@inktank.com>
osdc/Objecter: explicitly separate explicit pg target from current target

The pgid field is used to store the pg the op mapped to.  We were just
setting it directly for PGLS.  Instead, fill in base_pgid, and copy that
to pgid in recalc_op_target(), the same way we do when we map an object
name to a PG.

In particular, we take this opportunity to map a raw pgid to an actual
pgid.  This means the base_pg could come from a raw hash value (although
it doesn't, yet).

Signed-off-by: Sage Weil <sage@inktank.com>
osdc/Objecter: factor pg_read out of list_objects code

This will get used later for other ops against PGs (instead of objects).

Signed-off-by: Sage Weil <sage@inktank.com>
osdc/Objecter: stick bl inside ListContext

This is simpler and less error-prone.

Signed-off-by: Sage Weil <sage@inktank.com>
osdc/Objecter: drop redundant condition

We are inside an if (response_size) block.

Signed-off-by: Sage Weil <sage@inktank.com>
librados: add get_pg_hash_position to determine pg while listing objects

Signed-off-by: Sage Weil <sage@inktank.com>
osdc/Objecter: reimplement list_objects

Return to caller at the end of each PG.  This allows the caller to look at
the [pg_]hash_position and get something meaningful.

If there are no objects in the PG, we skip it so that every callback has
*some* data (unless the pool is totally empty!).  So the real difference
here is that we don't move on to the next PG just to reach max_entries.

This gives the client some data sooner, but may mean more callbacks into
client code.

Signed-off-by: Sage Weil <sage@inktank.com>
librados: seek during object iteration

Add ability to reset iterator to a specific hash position.  For now, we
just truncate this to the current PG.  In the future, this may be more
precise.

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