]> git-server-git.apps.pok.os.sepia.ceph.com Git - ceph.git/commitdiff
osd/PG: move shutdown into PG
authorSage Weil <sage@redhat.com>
Fri, 23 Feb 2018 15:17:12 +0000 (09:17 -0600)
committerSage Weil <sage@redhat.com>
Wed, 4 Apr 2018 13:26:57 +0000 (08:26 -0500)
Signed-off-by: Sage Weil <sage@redhat.com>
src/osd/PG.cc
src/osd/PG.h
src/osd/PrimaryLogPG.cc
src/osd/PrimaryLogPG.h

index 9759312bf510d5d0d81885512100368ce0a0f2c7..9be1907173fe130d0181f6344a740245bac458e4 100644 (file)
@@ -3298,6 +3298,13 @@ void PG::init(
   write_if_dirty(*t);
 }
 
+void PG::shutdown()
+{
+  lock();
+  on_shutdown();
+  unlock();
+}
+
 #pragma GCC diagnostic ignored "-Wpragmas"
 #pragma GCC diagnostic push
 #pragma GCC diagnostic ignored "-Wdeprecated-declarations"
index c15d4be09611af87969d9cad5ac268e4c31b30fd..947c3b14b77c3f89f5bf619c1164d3aa6c128f7e 100644 (file)
@@ -446,7 +446,8 @@ public:
   void get_pg_stats(std::function<void(const pg_stat_t&, epoch_t lec)> f);
   void with_heartbeat_peers(std::function<void(int)> f);
 
-  virtual void shutdown() = 0;
+  void shutdown();
+  virtual void on_shutdown() = 0;
 
   bool get_must_scrub() const {
     return scrubber.must_scrub;
index adda62bb47e241fd6152dec32858275a6b54eadd..e45d33f7bc04d8bd11d83a57b15db6d8bba561bc 100644 (file)
@@ -11676,13 +11676,6 @@ void PrimaryLogPG::clear_async_reads()
   }
 }
 
-void PrimaryLogPG::shutdown()
-{
-  lock();
-  on_shutdown();
-  unlock();
-}
-
 void PrimaryLogPG::on_shutdown()
 {
   dout(10) << __func__ << dendl;
index c71472106df012924de5c5cbf2640c45dafd46e4..37f44fa85743db866dbf6a720e9e2d791c708783 100644 (file)
@@ -1824,8 +1824,7 @@ public:
   void on_activate() override;
   void on_flushed() override;
   void on_removal(ObjectStore::Transaction *t) override;
-  void shutdown() override;
-  void on_shutdown();
+  void on_shutdown() override;
   bool check_failsafe_full() override;
   bool check_osdmap_full(const set<pg_shard_t> &missing_on) override;
   bool maybe_preempt_replica_scrub(const hobject_t& oid) override {