From: Sage Weil Date: Thu, 31 Aug 2017 21:51:25 +0000 (-0400) Subject: osd/PrimaryLogPG: scrub_snapshot_metadata: no need for snapdir X-Git-Tag: v13.0.1~840^2~45 X-Git-Url: http://git-server-git.apps.pok.os.sepia.ceph.com/?a=commitdiff_plain;h=0f26bd2ec742cea4a8abcef9214b9a3a99212c2f;p=ceph.git osd/PrimaryLogPG: scrub_snapshot_metadata: no need for snapdir The object never exists; no need to look for it. Signed-off-by: Sage Weil --- diff --git a/src/osd/PrimaryLogPG.cc b/src/osd/PrimaryLogPG.cc index d951ac3738c3..5e4675cf5098 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;