]> git.apps.os.sepia.ceph.com Git - ceph.git/commitdiff
osd/PG: add get_num_ref()
authorSage Weil <sage@redhat.com>
Sat, 16 Sep 2017 03:08:33 +0000 (23:08 -0400)
committerSage Weil <sage@redhat.com>
Fri, 6 Oct 2017 18:08:17 +0000 (13:08 -0500)
Signed-off-by: Sage Weil <sage@redhat.com>
src/osd/OSD.cc
src/osd/PG.h

index 824d345ab1cbd71a87020f96b3f100cacdc2744e..8290c011762933dbd56c1c4def92ec5e131e381a 100644 (file)
@@ -3380,9 +3380,9 @@ int OSD::shutdown()
         ++p) {
       dout(20) << " kicking pg " << p->first << dendl;
       p->second->lock();
-      if (p->second->ref != 1) {
+      if (p->second->get_num_ref() != 1) {
         derr << "pgid " << p->first << " has ref count of "
-            << p->second->ref << dendl;
+            << p->second->get_num_ref() << dendl;
 #ifdef PG_DEBUG_REFS
        p->second->dump_live_ids();
 #endif
index 402d52a7b648afb3f759d70f3ede054ba8052d84..fa01d21ec8047d06c1ad6dd1c268842173aba663 100644 (file)
@@ -416,6 +416,9 @@ public:
 #endif
   void get(const char* tag);
   void put(const char* tag);
+  int get_num_ref() {
+    return ref;
+  }
 
 
   // ctor