]> git.apps.os.sepia.ceph.com Git - ceph.git/commitdiff
ReplicatedPG: adjust num_pinned in _delete_oid 9496/head
authorSamuel Just <sjust@redhat.com>
Fri, 20 May 2016 20:59:10 +0000 (13:59 -0700)
committerVicente Cheng <freeze.bilsted@gmail.com>
Sat, 4 Jun 2016 09:52:19 +0000 (17:52 +0800)
Fixes: http://tracker.ceph.com/issues/15952
Signed-off-by: Samuel Just <sjust@redhat.com>
(cherry picked from commit 907d4e25c676fd3e1c2be90ce8ab5b64b362b0bc)

src/osd/ReplicatedPG.cc

index e846938610abc7e063da91b618140838c2fee947..352918c20d886d5f8625d895ba2d36b0b642dac8 100644 (file)
@@ -5230,6 +5230,9 @@ inline int ReplicatedPG::_delete_oid(OpContext *ctx, bool no_whiteout)
     dout(20) << __func__ << " deleting whiteout on " << soid << dendl;
     ctx->delta_stats.num_whiteouts--;
   }
+  if (oi.is_cache_pinned()) {
+    ctx->delta_stats.num_objects_pinned--;
+  }
   if (soid.is_head())
     snapset.head_exists = false;
   obs.exists = false;