]> git.apps.os.sepia.ceph.com Git - ceph.git/commitdiff
osd: make sparse data/clone push behave with partial object push
authorSage Weil <sage@newdream.net>
Fri, 24 Sep 2010 18:43:37 +0000 (11:43 -0700)
committerSage Weil <sage@newdream.net>
Wed, 6 Oct 2010 20:01:13 +0000 (13:01 -0700)
We can't error out if we don't get everything we want in one go now that
we support pushing objects in pieces.  Remove this check entirely, since
we don't have a good error handling case anyway.

src/osd/ReplicatedPG.cc

index f9b4da63570d9014b915a5ad9aff54fbaa9da062..264fed24a311408ea39a4afb93d7cfce0a9d3316 100644 (file)
@@ -3503,12 +3503,15 @@ void ReplicatedPG::sub_op_push(MOSDSubOp *op)
       interval_set<uint64_t> data_needed;
       calc_clone_subsets(ssc->snapset, soid, missing, data_needed, clone_subsets);
       put_snapset_context(ssc);
+
+      interval_set<uint64_t> overlap;
+      overlap.intersection_of(data_subset, data_needed);
       
-      dout(10) << "sub_op_push need " << data_needed << ", got " << data_subset << dendl;
-      if (!data_needed.subset_of(data_subset)) {
-       dout(0) << "sub_op_push we did not get enough of " << soid << " object data" << dendl;
-       op->put();
-       return;
+      dout(10) << "sub_op_push need " << data_needed << ", got " << data_subset
+              << ", overlap " << overlap << dendl;
+
+      if (op->complete) {
+       // FIXME: we should verify that we got the whole thing.
       }
 
       // did we get more data than we need?