]> git-server-git.apps.pok.os.sepia.ceph.com Git - ceph.git/commitdiff
Merge pull request #4526 from athanatos/wip-11296
authorSage Weil <sage@redhat.com>
Fri, 29 May 2015 21:19:44 +0000 (14:19 -0700)
committerSage Weil <sage@redhat.com>
Fri, 29 May 2015 21:19:44 +0000 (14:19 -0700)
Wip 11296

Reviewed-by: Sage Weil <sage@redhat.com>
1  2 
src/osd/ReplicatedPG.cc

index b19552c9ce3a83c9a48cf1ac6837314eccb93ad4,853c81d14abc30615d936f6f09962da4f500809f..e310db631c713f79e4292178b0e619af2345a9e0
@@@ -6676,32 -6643,9 +6705,14 @@@ void ReplicatedPG::finish_promote(int r
      }
      tctx->new_obs.oi.size = results->object_size;
      tctx->new_obs.oi.user_version = results->user_version;
 +    // Don't care src object whether have data or omap digest
 +    if (results->object_size)
 +      tctx->new_obs.oi.set_data_digest(results->data_digest);
 +    if (results->has_omap)
 +      tctx->new_obs.oi.set_omap_digest(results->omap_digest);
  
      if (soid.snap != CEPH_NOSNAP) {
-       if (!results->snaps.empty()) {
-       tctx->new_obs.oi.snaps = results->snaps;
-       } else {
-       // we must have read "snap" content from the head object in
-       // the base pool.  use snap_seq to construct what snaps should
-       // be for this clone (what is was before we evicted the clean
-       // clone from this pool, and what it will be when we flush and
-       // the clone eventually happens in the base pool).
-       SnapSet& snapset = obc->ssc->snapset;
-       vector<snapid_t>::iterator p = snapset.snaps.begin();
-       while (p != snapset.snaps.end() && *p > soid.snap)
-         ++p;
-       assert(p != snapset.snaps.end());
-       do {
-         tctx->new_obs.oi.snaps.push_back(*p);
-         ++p;
-       } while (p != snapset.snaps.end() && *p > results->snap_seq);
-       }
-       dout(20) << __func__ << " snaps " << tctx->new_obs.oi.snaps << dendl;
+       tctx->new_obs.oi.snaps = results->snaps;
        assert(!tctx->new_obs.oi.snaps.empty());
        assert(obc->ssc->snapset.clone_size.count(soid.snap));
        assert(obc->ssc->snapset.clone_size[soid.snap] ==