From: Sage Weil Date: Fri, 1 Sep 2017 01:06:29 +0000 (-0400) Subject: osd/PrimaryLogPG: do_op: move up LIST_SNAPS specialness X-Git-Tag: v13.0.1~840^2~34 X-Git-Url: http://git-server-git.apps.pok.os.sepia.ceph.com/?a=commitdiff_plain;h=881f4be3a67bc4cdfea69a74ed9d5d26ec6ed4af;p=ceph.git osd/PrimaryLogPG: do_op: move up LIST_SNAPS specialness Signed-off-by: Sage Weil --- diff --git a/src/osd/PrimaryLogPG.cc b/src/osd/PrimaryLogPG.cc index d411615829e..b9a78e36495 100644 --- a/src/osd/PrimaryLogPG.cc +++ b/src/osd/PrimaryLogPG.cc @@ -2119,6 +2119,13 @@ void PrimaryLogPG::do_op(OpRequestRef& op) m->has_flag(CEPH_OSD_FLAG_MAP_SNAP_CLONE), &missing_oid); + // LIST_SNAPS needs the ssc too + if (obc && + m->get_snapid() == CEPH_SNAPDIR && + !obc->ssc) { + obc->ssc = get_snapset_context(oid, true); + } + if (r == -EAGAIN) { // If we're not the primary of this OSD, we just return -EAGAIN. Otherwise, // we have to wait for the object. @@ -9757,11 +9764,6 @@ int PrimaryLogPG::find_object_context(const hobject_t& oid, << dendl; *pobc = obc; - // always populate ssc for SNAPDIR... - if (!obc->ssc) - obc->ssc = get_snapset_context( - oid, true); - return 0; } // we want a snap