From 8924bbeb5f16076de0313a769eb4fb246a664c67 Mon Sep 17 00:00:00 2001 From: Sage Weil Date: Fri, 1 Sep 2017 13:33:56 -0400 Subject: [PATCH] osd/PrimaryLogPG: finish_promote: drop legacy snapset handling Signed-off-by: Sage Weil --- src/osd/PrimaryLogPG.cc | 11 +---------- 1 file changed, 1 insertion(+), 10 deletions(-) diff --git a/src/osd/PrimaryLogPG.cc b/src/osd/PrimaryLogPG.cc index 51d8992c45cf8..d4bd1b2434f33 100644 --- a/src/osd/PrimaryLogPG.cc +++ b/src/osd/PrimaryLogPG.cc @@ -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); -- 2.39.5