]> git.apps.os.sepia.ceph.com Git - ceph.git/commitdiff
ReplicatedPG::do_op: ignore snapset_obc if !exists 3621/head
authorSamuel Just <sjust@redhat.com>
Mon, 2 Feb 2015 16:37:05 +0000 (08:37 -0800)
committerSamuel Just <sjust@redhat.com>
Tue, 3 Feb 2015 16:37:37 +0000 (08:37 -0800)
Fixes: 10717
Signed-off-by: Samuel Just <sjust@redhat.com>
src/osd/ReplicatedPG.cc

index b0b096c272f7249cb58192e96924e7108c0bbe5b..5f230f8d072a2c13326f886885df4246241d9998 100644 (file)
@@ -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) {