osd/ReplicatedPG: handle COPY_FROM self

Return EINVAL if we try to COPY_FROM ourselves.

Signed-off-by: Sage Weil <sage@inktank.com>
ceph_test_rados: do not COPY_FROM self

Signed-off-by: Sage Weil <sage@inktank.com>
ceph_test_rados: limit max_in_flight to objects/2

In particular, we need to allow all in-flight ops to be COPY_FROM.

Signed-off-by: Sage Weil <sage@inktank.com>
ceph_test_rados: fix seq_num, improve error output

Signed-off-by: Sage Weil <sage@inktank.com>
ceph_test_rados: fix COPY_FROM completion

Fix the copy_from operation to not remove the objects from the in_use list
until after the entire operation is complete.  In particular, the racing
read was completing and removing the dest oid from the in-use list before
the copy-from completed.  This keeps the model in sync with what the OSD
is actually doing.

If another new read started up, it would grab the previous value from the
model and expect to see that, but would instead see the updated value.

Signed-off-by: Sage Weil <sage@inktank.com>
Merge pull request #614 from ceph/wip-rados-model

Prevent copy_from against yourself, and fix issues with the testing framework around it

Reviewed-by: Greg Farnum <greg@inktank.com>