]> git-server-git.apps.pok.os.sepia.ceph.com Git - ceph.git/commitdiff
osd/: merge update_store_with_options with on_pool_change
authorsjust@redhat.com <sjust@redhat.com>
Wed, 27 Mar 2019 22:43:27 +0000 (15:43 -0700)
committersjust@redhat.com <sjust@redhat.com>
Wed, 1 May 2019 18:22:14 +0000 (11:22 -0700)
Signed-off-by: sjust@redhat.com <sjust@redhat.com>
src/osd/PG.cc
src/osd/PG.h
src/osd/PeeringState.cc
src/osd/PeeringState.h
src/osd/PrimaryLogPG.cc
src/osd/PrimaryLogPG.h

index a579167340a49f91fd2e7f7dc011c09869856b75..98d6a546e7a28c6c0fa8389baa3906563a86be2b 100644 (file)
@@ -6155,12 +6155,13 @@ void PG::handle_query_state(Formatter *f)
   recovery_state.handle_event(q, 0);
 }
 
-void PG::update_store_with_options(const pool_opts_t &opts)
+void PG::on_pool_change()
 {
-  auto r = osd->store->set_collection_opts(ch, opts);
+  auto r = osd->store->set_collection_opts(ch, pool.info.opts);
   if(r < 0 && r != -EOPNOTSUPP) {
     derr << __func__ << " set_collection_opts returns error:" << r << dendl;
   }
+  plpg_on_pool_change();
 }
 
 void PG::C_DeleteMore::complete(int r) {
index 8c61d4f002ac02798c68e63c6e3193697aa85c0f..003050f07319ae68dd707fe42091ca7a1fd6e0ea 100644 (file)
@@ -417,6 +417,10 @@ public:
   void on_role_change() override;
   virtual void plpg_on_role_change() = 0;
 
+  void on_pool_change() override;
+  virtual void plpg_on_pool_change() = 0;
+
+
   void clear_publish_stats() override;
   void clear_primary_state() override;
 
@@ -1518,8 +1522,6 @@ public:
     bool need_update_epoch,
     map<string,bufferlist> *km);
 
-  void update_store_with_options(const pool_opts_t &opts) override;
-
   static int _prepare_write_info(
     CephContext* cct,
     map<string,bufferlist> *km,
index 18a38ee4485ea4913e83e682a0dcfc78ecc52b28..0f035a401396961793cf11ae36e8633c2b4427c9 100644 (file)
@@ -348,7 +348,6 @@ void PeeringState::advance_map(
   handle_event(evt, rctx);
   if (pool.info.last_change == osdmap_ref->get_epoch()) {
     pl->on_pool_change();
-    pl->update_store_with_options(pool.info.opts);
   }
   last_require_osd_release = osdmap->require_osd_release;
 }
index b5f887c5457fbea18864321b044a8ae7e49fb00c..249ac29553b059a589ee2ff7d594c0d1c45a2a26 100644 (file)
@@ -64,7 +64,6 @@ public:
       bool dirty_big_info,
       bool need_write_epoch,
       ObjectStore::Transaction &t) = 0;
-    virtual void update_store_with_options(const pool_opts_t &opts) = 0;
     virtual void update_heartbeat_peers(set<int> peers) = 0;
 
     virtual void reg_next_scrub() = 0;
index e4307c6e91fb0d53a0acef3d61eddc66a86a24c0..647e2f321d69029b03297e2793e1a1755b5ef233 100644 (file)
@@ -12317,7 +12317,7 @@ void PrimaryLogPG::plpg_on_role_change()
   }
 }
 
-void PrimaryLogPG::on_pool_change()
+void PrimaryLogPG::plpg_on_pool_change()
 {
   dout(10) << __func__ << dendl;
   // requeue cache full waiters just in case the cache_mode is
index c101df13cc6edbdd9fafd28f27aa7a6b6f40be7c..e31a099fb5fc3b0156b6ebbb855b8921e3ec3b12 100644 (file)
@@ -1859,7 +1859,7 @@ public:
     OpRequestRef &op);
 
   void plpg_on_role_change() override;
-  void on_pool_change() override;
+  void plpg_on_pool_change() override;
   void plpg_on_new_interval() override;
   void clear_async_reads();
   void on_change(ObjectStore::Transaction *t) override;