]> git.apps.os.sepia.ceph.com Git - ceph.git/commitdiff
osd/PrimaryLogPG: finish_promote: drop legacy snapset handling
authorSage Weil <sage@redhat.com>
Fri, 1 Sep 2017 17:33:56 +0000 (13:33 -0400)
committerSage Weil <sage@redhat.com>
Thu, 21 Sep 2017 18:29:33 +0000 (14:29 -0400)
Signed-off-by: Sage Weil <sage@redhat.com>
src/osd/PrimaryLogPG.cc

index 51d8992c45cf84c3a3dfc5d5a9be872470395480..d4bd1b2434f3367cc48d827074703cecd9671af4 100644 (file)
@@ -8268,9 +8268,6 @@ void PrimaryLogPG::finish_promote(int r, CopyResults *results,
 
   tctx->extra_reqids = results->reqids;
 
-  bool legacy_snapset = tctx->new_snapset.is_legacy() ||
-    get_osdmap()->require_osd_release < CEPH_RELEASE_LUMINOUS;
-
   if (whiteout) {
     // create a whiteout
     tctx->op_t->create(soid);
@@ -8300,13 +8297,7 @@ void PrimaryLogPG::finish_promote(int r, CopyResults *results,
     tctx->new_obs.oi.truncate_size = results->truncate_size;
 
     if (soid.snap != CEPH_NOSNAP) {
-      if (legacy_snapset) {
-       tctx->new_obs.oi.legacy_snaps = results->snaps;
-       assert(!tctx->new_obs.oi.legacy_snaps.empty());
-      } else {
-       // it's already in the snapset
-       assert(obc->ssc->snapset.clone_snaps.count(soid.snap));
-      }
+      assert(obc->ssc->snapset.clone_snaps.count(soid.snap));
       assert(obc->ssc->snapset.clone_size.count(soid.snap));
       assert(obc->ssc->snapset.clone_size[soid.snap] ==
             results->object_size);