From 0f26bd2ec742cea4a8abcef9214b9a3a99212c2f Mon Sep 17 00:00:00 2001 From: Sage Weil Date: Thu, 31 Aug 2017 17:51:25 -0400 Subject: [PATCH] osd/PrimaryLogPG: scrub_snapshot_metadata: no need for snapdir The object never exists; no need to look for it. Signed-off-by: Sage Weil --- src/osd/PrimaryLogPG.cc | 11 ----------- 1 file changed, 11 deletions(-) diff --git a/src/osd/PrimaryLogPG.cc b/src/osd/PrimaryLogPG.cc index d951ac3738c..5e4675cf509 100644 --- a/src/osd/PrimaryLogPG.cc +++ b/src/osd/PrimaryLogPG.cc @@ -13851,19 +13851,8 @@ void PrimaryLogPG::scrub_snapshot_metadata( << " obc->obs.oi.soid: " << obc->obs.oi.soid; continue; } - ObjectContextRef snapset_obc; - if (!obc->obs.exists) { - snapset_obc = get_object_context(p.first.get_snapdir(), false); - if (!snapset_obc) { - osd->clog->error() << info.pgid << " " << mode - << " cannot get object context for " - << p.first.get_snapdir(); - continue; - } - } OpContextUPtr ctx = simple_opc_create(obc); PGTransaction *t = ctx->op_t.get(); - ctx->snapset_obc = snapset_obc; ctx->at_version = get_next_version(); ctx->mtime = utime_t(); // do not update mtime ctx->new_snapset = p.second; -- 2.39.5