FIXUP "OSD: add a RWLock pg_map_lock"

Remove a TODO comment.

Signed-off-by: Greg Farnum <greg@inktank.com>
FIXUP "OSD: wake_pg_waiters atomically with pg_map update"

Grab the PG reference while holding the pg_map write lock, to prevent
somebody else from (improbably) freeing it out from under us.

Signed-off-by: Greg Farnum <greg@inktank.com>
FIXUP "OSD: wake_pg_waiters atomically with pg_map update"

Do not hold a write lock on pg_map_lock while looking through the entire
waiting_for_pg list. Drop it and reacquire on each PG, instead.

Signed-off-by: Greg Farnum <greg@inktank.com>
FIXUP: "OSD: wake_pg_waiters atomically with pg_map update"

Correct a comment so it makes sense.
SQUASH: enqueue_op no longer requires holding the osd_lock.
SQUASH OSD: move the {boot,up,bind} epochs into OSDService

Provide interfaces around setting and retrieving them, instead of accessing
them directly with a lock.

Signed-off-by: Greg Farnum <greg@inktank.com>
OSD: move the peer_epoch infrastructure into OSDService

Signed-off-by: Greg Farnum <greg@inktank.com>
OSD: move build_incremental_map_msg into OSDService

Signed-off-by: Greg Farnum <greg@inktank.com>
OSD: Move send_map into OSDService

Signed-off-by: Greg Farnum <greg@inktank.com>
OSD: Move send_incremental_map into OSDService

Signed-off-by: Greg Farnum <greg@inktank.com>
OSD: move _share_map_outgoing into OSDService

Signed-off-by: Greg Farnum <greg@inktank.com>
OSD: rename share_map_incoming and share_map_outgoing

share_map_incoming -> share_map
share_map_outgoing -> share_map_peer

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