hobject_t/ReplicatedPG: tempness is now an hobject thing

PGBackend implmentations will have complete control over the temp
collection.  Rather than specifying the collection when sending
ops into the PGBackend, hobjects themselves will be temp or not.

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

RPGTransaction is essentially a wrapped ObjectStore::Transaction.
The coll_t argument is elided, tempness is instead encoded in the
hobject.  RPGTransaction tracks which temp objects are created and
cleared so we can update the ReplicatedBackend tracking and possibly
create the temp collection as needed.

Signed-off-by: Samuel Just <sam.just@inktank.com>
PG/ReplicatedPG: move snap map management into append_log

Both the replica and the primary should use the same append_log
mechanism to update the snap map.

Signed-off-by: Samuel Just <sam.just@inktank.com>
ReplicatedPG: split out op_applied_replica

Signed-off-by: Samuel Just <sam.just@inktank.com>
ReplicatedPG: factor out should_send_op

Signed-off-by: Samuel Just <sam.just@inktank.com>
PGBackend: allow queue_transaction to specify an op

Signed-off-by: Samuel Just <sam.just@inktank.com>
osd/: move client op handling into ReplicatedBackend

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

Contains information needed to roll back a pg_log_entry_t.

Signed-off-by: Samuel Just <sam.just@inktank.com>
osd_types: add ObjectModDesc into pg_log_entry_t

Signed-off-by: Samuel Just <sam.just@inktank.com>
osd_types: add a can_rollback_to line to pg_log_t

This allows us to determine how far back the log can be rolled.

Signed-off-by: Samuel Just <sam.just@inktank.com>
PGBackend,ReplicatedBackend: add support for rolling back log entries

Signed-off-by: Samuel Just <sam.just@inktank.com>
osd/: introduce xattr caching for ec pools

Signed-off-by: Samuel Just <sam.just@inktank.com>
ReplicatedPG: Fill in rollback info for log events

Signed-off-by: Samuel Just <sam.just@inktank.com>
PGLog: create interface allowing interface user to cleanup/rollback

We need to be able to allow the PGLog interface user to provide
logic for rolling back and trimming log entries.  To that end,
serveral PGLog methods now take a LogEntryHander.

In PGLog::merge_old_entry, if prior_version > info.log_tail and
the object is not missing, we must have rolled back the prior
log entry.  Thus, we don't skip the entry.

To simplify the code, _merge_old_entry has been split out as
a const helper.  This way, proc_replica_log can be reexpressed
as merging the divergent replica log entries with the fully
merged authoritative log.

Signed-off-by: Samuel Just <sam.just@inktank.com>
PGLog: we cannot rollback past a recovered object entry

We don't recover the older versions, so we can't do a rollback.
In general, this is ok since we had enough copies to recover it
in the first place.

Signed-off-by: Samuel Just <sam.just@inktank.com>
PGLog,PG: reset can_rollback_to when we get a log entry without a transaction

Signed-off-by: Samuel Just <sam.just@inktank.com>
ObjectStore: _collection_move_rename needs to increment ops

Signed-off-by: Samuel Just <sam.just@inktank.com>
osd/: add sync/async read methods to PGBackend

Signed-off-by: Samuel Just <sam.just@inktank.com>
ReplicatedPG: use pgbackend->objects_read_sync() as appropriate

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

EC pools won't support SYNC reads.  This means that TMAP and friends
along with reads from an object class will not be supported.

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