]> git.apps.os.sepia.ceph.com Git - ceph.git/commitdiff
osd: decrement deleting pg count in _delete_some
authorSage Weil <sage@redhat.com>
Tue, 20 Feb 2018 21:49:19 +0000 (15:49 -0600)
committerSage Weil <sage@redhat.com>
Wed, 4 Apr 2018 13:26:56 +0000 (08:26 -0500)
The exit() method for ToDelete state doesn't run on PG destruction.

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

index 518ac11701e1ee88b4db372c6975042b8ccc1436..4c68bb152db3a2e29b38281bc226416c29cd8c90 100644 (file)
@@ -6547,6 +6547,8 @@ void PG::_delete_some()
     // cancel reserver here, since the PG is about to get deleted and the
     // exit() methods don't run when that happens.
     osd->local_reserver.cancel_reservation(info.pgid);
+
+    osd->logger->dec(l_osd_pg_removing);
   }
 }
 
@@ -8448,6 +8450,8 @@ void PG::RecoveryState::ToDelete::exit()
 {
   context< RecoveryMachine >().log_exit(state_name, enter_time);
   PG *pg = context< RecoveryMachine >().pg;
+  // note: on a successful removal, this path doesn't execute. see
+  // _delete_some().
   pg->osd->logger->dec(l_osd_pg_removing);
   pg->osd->local_reserver.cancel_reservation(pg->info.pgid);
 }