JounralingObjectStore: journal->committed_thru after replay

It's possible that the osd stopped between when the filestore
op_seq file was updated and when the journal was trimmed.  In
that case, it's possible that on boot the journal might be
full, and yet not be trimmed because commit_start assumes
there is no work to do.  Calling committed_thru on the journal
ensures that the journal matches committed_seq.

Backport: emperor dumpling
Fixes: 6756
Signed-off-by: Samuel Just <sam.just@inktank.com>
Reviewed-by: Josh Durgin <josh.durgin@inktank.com>
Reviewed-by: David Zafman <david.zafman@inktank.com>
ReplicatedPG: test for missing head before find_object_context

find_object_context doesn't return EAGAIN for a missing head.
I chose not to change that behavior since it might hide bugs
in the future.  All other callers check for missing on head
before calling into find_object_context because we potentially
need head or snapdir to map a snapid onto a clone.

Backport: emperor
Fixes: 6758
Signed-off-by: Samuel Just <sam.just@inktank.com>
Reviewed-by: Josh Durgin <josh.durgin@inktank.com>
Reviewed-by: David Zafman <david.zafman@inktank.com>
CephContext: unregister lockdep after stopping service thread

Fixes: #6769
Fixes: #6674
Signed-off-by: Samuel Just <sam.just@inktank.com>
Reviewed-by: Josh Durgin <josh.durgin@inktank.com>
osd_types: fix object_info_t backwards compatibility

Shipping an object_info_t to a replica with the dirty
flag set would cause the replica to interpret that
object as being lost.  Instead, we always encode
lost into the slot where dumpling expects to find
it and add another field at the end of the encoding.

Backport: emperor
Fixes: #6761
Signed-off-by: Samuel Just <sam.just@inktank.com>
Reviewed-by: Greg Farnum <greg@inktank.com>
ceph-filestore-tool: add tool for fixing lost objects

Used to repair: #6761
Backport: emperor
Signed-off-by: Samuel Just <sam.just@inktank.com>
Reviewed-by: Greg Farnum <greg@inktank.com>
PGBackend: add PGTransaction

Signed-off-by: Samuel Just <sam.just@inktank.com>
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>
working
working
working
working
working
working
working
ReplicatedBackend.h: don't need to be active for pushes

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