]> git-server-git.apps.pok.os.sepia.ceph.com Git - ceph.git/commitdiff
osd/PrimaryLogPG: scrub_snapshot_metadata: no need for snapdir
authorSage Weil <sage@redhat.com>
Thu, 31 Aug 2017 21:51:25 +0000 (17:51 -0400)
committerSage Weil <sage@redhat.com>
Mon, 11 Sep 2017 14:11:30 +0000 (09:11 -0500)
The object never exists; no need to look for it.

Signed-off-by: Sage Weil <sage@redhat.com>
src/osd/PrimaryLogPG.cc

index d951ac3738c389c1b400ee54ac76c1130caab554..5e4675cf509801a661b069053038cd9b055520ba 100644 (file)
@@ -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;