From: Samuel Just Date: Mon, 2 Feb 2015 16:37:05 +0000 (-0800) Subject: ReplicatedPG::do_op: ignore snapset_obc if !exists X-Git-Tag: v0.93~95^2~2^2 X-Git-Url: http://git-server-git.apps.pok.os.sepia.ceph.com/?a=commitdiff_plain;h=c6a60d9c73d53029fa14f9453d090df553598770;p=ceph.git ReplicatedPG::do_op: ignore snapset_obc if !exists Fixes: 10717 Signed-off-by: Samuel Just --- diff --git a/src/osd/ReplicatedPG.cc b/src/osd/ReplicatedPG.cc index b0b096c272f72..5f230f8d072a2 100644 --- a/src/osd/ReplicatedPG.cc +++ b/src/osd/ReplicatedPG.cc @@ -1697,6 +1697,14 @@ void ReplicatedPG::do_op(OpRequestRef& op) if (!obc->obs.exists) ctx->snapset_obc = get_object_context(obc->obs.oi.soid.get_snapdir(), false); + /* Due to obc caching, we might have a cached non-existent snapset_obc + * for the snapdir. If so, we can ignore it. Subsequent parts of the + * do_op pipeline make decisions based on whether snapset_obc is + * populated. + */ + if (ctx->snapset_obc && !ctx->snapset_obc->obs.exists) + ctx->snapset_obc = ObjectContextRef(); + if (m->get_flags() & CEPH_OSD_FLAG_SKIPRWLOCKS) { dout(20) << __func__ << ": skipping rw locks" << dendl; } else if (m->get_flags() & CEPH_OSD_FLAG_FLUSH) {