osd/ReplicatedPG: make CopyResults inline in CopyOp

No reason to put this on the heap.  Make the lifetime match that of the
CopyOp.

Signed-off-by: Sage Weil <sage@inktank.com>
osd/ReplicatedPG: adjust flow in process_copy_chunk

Signed-off-by: Sage Weil <sage@inktank.com>
ceph_test_rados_misc: test bad version for copy-from

Signed-off-by: Sage Weil <sage@inktank.com>
osd/ReplicatedPG: simplify copy-from temp object handling

Previously the caller was generating a temp object name and passing it
down in severaly different ways.  Instead, generate one when we realize
that we need it, and store it in *one* place (CopyResults), where
the completions can get at the information.

Signed-off-by: Sage Weil <sage@inktank.com>
osd/ReplicatedPG: handle promote that races with snap deletion

If we are promoting a clone and realize that the object is no longer
defined for any snaps, abort the copy and delete any temp object.

If the defined snaps have changed, make sure they are updated in memory
so that on promote completion the snapshot metadata is correct.

Signed-off-by: Sage Weil <sage@inktank.com>
osd: fix propagation of removed snaps to other tiers

When we update removed_snaps we do not update snap_seq.  Drop this broken
optimization.

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

Signed-off-by: Sage Weil <sage@inktank.com>
osd/Replicated: mark obc !exists on snap trim

Signed-off-by: Sage Weil <sage@inktank.com>
osd/ReplicatedPG: cleanly abort flush if the object no longer exists

If the object no longer exists (for example, because the snap trimmer just
killed it) clean up the flush state without trying to mark the object
clean.

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