From a6fef5a61bd217735ae6b8ca5dbe7b2bb2044eeb Mon Sep 17 00:00:00 2001 From: Sage Weil Date: Fri, 9 Feb 2018 15:49:50 -0600 Subject: [PATCH] osd/PG: remove old update_store_on_load() This isn't needed post-luminous. Signed-off-by: Sage Weil --- src/osd/PG.cc | 17 ----------------- src/osd/PG.h | 1 - 2 files changed, 18 deletions(-) diff --git a/src/osd/PG.cc b/src/osd/PG.cc index 23db5e6d428..a1995c58d2a 100644 --- a/src/osd/PG.cc +++ b/src/osd/PG.cc @@ -6510,22 +6510,6 @@ void PG::update_store_with_options() } } -void PG::update_store_on_load() -{ - if (osd->store->get_type() == "filestore") { - // legacy filestore didn't store collection bit width; fix. - int bits = osd->store->collection_bits(ch); - if (bits < 0) { - assert(!coll.is_meta()); // otherwise OSD::load_pgs() did a bad thing - bits = info.pgid.get_split_bits(pool.info.get_pg_num()); - lderr(cct) << __func__ << " setting bit width to " << bits << dendl; - ObjectStore::Transaction t; - t.collection_set_bits(coll, bits); - osd->store->queue_transaction(ch, std::move(t)); - } - } -} - struct C_DeleteMore : public Context { PGRef pg; epoch_t epoch; @@ -6654,7 +6638,6 @@ boost::statechart::result PG::RecoveryState::Initial::react(const Load& l) pg->send_notify = (!pg->is_primary()); pg->update_store_with_options(); - pg->update_store_on_load(); return transit< Reset >(); } diff --git a/src/osd/PG.h b/src/osd/PG.h index a119412d7a0..39e7069ac6c 100644 --- a/src/osd/PG.h +++ b/src/osd/PG.h @@ -2874,7 +2874,6 @@ protected: void prepare_write_info(map *km); void update_store_with_options(); - void update_store_on_load(); public: static int _prepare_write_info( -- 2.47.3