]> git.apps.os.sepia.ceph.com Git - ceph.git/commitdiff
ReplicatedPG: make_writeable, use correct size for clone_size entry
authorSamuel Just <samuel.just@dreamhost.com>
Thu, 9 Jun 2011 17:51:49 +0000 (10:51 -0700)
committerSamuel Just <samuel.just@dreamhost.com>
Thu, 9 Jun 2011 18:31:29 +0000 (11:31 -0700)
Previously, we used obs.oi.size for the clone size, but obs refers to
new_obs.  The clone's size should be the old size,
ctx->obc->obs.oi.size.

Signed-off-by: Samuel Just <samuel.just@dreamhost.com>
src/osd/ReplicatedPG.cc

index ac071bd7b9f9bf38c45fb75cca36a1c68ca11df0..935f2d4c161f517b85b6bcacf80ed1dce8fbca23 100644 (file)
@@ -2104,7 +2104,7 @@ void ReplicatedPG::make_writeable(OpContext *ctx)
     info.stats.num_objects++;
     info.stats.num_object_clones++;
     ssc->snapset.clones.push_back(coid.snap);
-    ssc->snapset.clone_size[coid.snap] = obs.oi.size;
+    ssc->snapset.clone_size[coid.snap] = ctx->obc->obs.oi.size;
 
     // clone_overlap should contain an entry for each clone 
     // (an empty interval_set if there is no overlap)