From: Sage Weil Date: Fri, 1 Sep 2017 17:33:56 +0000 (-0400) Subject: osd/PrimaryLogPG: finish_promote: drop legacy snapset handling X-Git-Tag: v13.0.1~840^2~14 X-Git-Url: http://git-server-git.apps.pok.os.sepia.ceph.com/?a=commitdiff_plain;h=8924bbeb5f16076de0313a769eb4fb246a664c67;p=ceph.git osd/PrimaryLogPG: finish_promote: drop legacy snapset handling Signed-off-by: Sage Weil --- diff --git a/src/osd/PrimaryLogPG.cc b/src/osd/PrimaryLogPG.cc index 51d8992c45c..d4bd1b2434f 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);