]> git.apps.os.sepia.ceph.com Git - ceph-ci.git/commitdiff
osd/PG: add dump_pgstate_history() to public interface
authorSage Weil <sage@redhat.com>
Sat, 16 Sep 2017 02:58:15 +0000 (22:58 -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.cc
src/osd/PG.h

index de97baf1a43fe01a438ca89e6aba771c85255b37..9a4143943b6bd6d4d8cb50f5eb9317d609a4fff6 100644 (file)
@@ -2238,9 +2238,7 @@ will start to track new ops received afterwards.";
 
       PG *pg = it->second;
       f->dump_stream("pg") << pg->pg_id;
-      pg->lock();
-      pg->pgstate_history.dump(f);
-      pg->unlock();
+      pg->dump_pgstate_history(f);
     }
     f->close_section();
   } else if (admin_command == "compact") {
index f04e5c39fdc246388d6791a84a6d00af441abf47..56d055a077a0c6caa554ee31cfb40f20245847c0 100644 (file)
@@ -8134,3 +8134,10 @@ ostream& operator<<(ostream& out, const PG::BackfillInterval& bi)
   out << ")";
   return out;
 }
+
+void PG::dump_pgstate_history(Formatter *f)
+{
+  lock();
+  pgstate_history.dump(f);
+  unlock();
+}
index 391061cccc89d1e6b97a6f84a2de519c38c9698c..28f3739a576d46906726c25c003ee977b2625418 100644 (file)
@@ -382,6 +382,8 @@ public:
 
   virtual void get_watchers(std::list<obj_watch_item_t> *ls) = 0;
 
+  void dump_pgstate_history(Formatter *f);
+
   virtual void do_request(
     OpRequestRef& op,
     ThreadPool::TPHandle &handle