]> git-server-git.apps.pok.os.sepia.ceph.com Git - ceph.git/commitdiff
ReplicatedPG: assert that we have succeeded in do_osd_ops on copyfrom repeats
authorGreg Farnum <greg@inktank.com>
Fri, 4 Oct 2013 16:26:02 +0000 (09:26 -0700)
committerGreg Farnum <greg@inktank.com>
Fri, 4 Oct 2013 19:59:05 +0000 (12:59 -0700)
Our callback is handling errors on its own at this point.

Signed-off-by: Greg Farnum <greg@inktank.com>
src/osd/ReplicatedPG.cc

index ce5d347cb3bc2d50fed0fa63c1a0edcaece1f2e7..8ba4c6cdc9fcd2ad194225cd22763671ed6ff815 100644 (file)
@@ -3774,10 +3774,8 @@ int ReplicatedPG::do_osd_ops(OpContext *ctx, vector<OSDOp>& ops)
          result = -EINPROGRESS;
        } else {
          // finish
-         result = ctx->copy_cb->get_result();
-         if (result >= 0) { //success!
-           result = finish_copyfrom(ctx);
-         }
+         assert(ctx->copy_cb->get_result() >= 0);
+         result = finish_copyfrom(ctx);
        }
       }
       break;