From: Misono Tomohiro Date: Thu, 20 May 2021 12:35:16 +0000 (+0900) Subject: osd/PeeringState: cleanup dead code in PeeringState::init X-Git-Tag: v17.1.0~1827^2 X-Git-Url: http://git-server-git.apps.pok.os.sepia.ceph.com/?a=commitdiff_plain;h=f9d1c2bcb599d4cb55ebda59cbe3671c34886217;p=ceph.git osd/PeeringState: cleanup dead code in PeeringState::init Argument 'backfill' in PeeringState::init is always set to false. Commit log shows this is originally for _create_lock_pg which is removed in d9dcaa79b779. So, just remove dead code. Signed-off-by: Misono Tomohiro --- diff --git a/src/crimson/osd/osd.cc b/src/crimson/osd/osd.cc index ab9862ae5556..99854546dd72 100644 --- a/src/crimson/osd/osd.cc +++ b/src/crimson/osd/osd.cc @@ -940,7 +940,6 @@ seastar::future> OSD::handle_pg_create_info( acting_primary, info->history, info->past_intervals, - false, rctx.transaction); return shard_services.start_operation( diff --git a/src/crimson/osd/pg.cc b/src/crimson/osd/pg.cc index 35b41fbc2944..9693680154b9 100644 --- a/src/crimson/osd/pg.cc +++ b/src/crimson/osd/pg.cc @@ -405,12 +405,11 @@ void PG::init( const vector& newacting, int new_acting_primary, const pg_history_t& history, const PastIntervals& pi, - bool backfill, ObjectStore::Transaction &t) { peering_state.init( role, newup, new_up_primary, newacting, - new_acting_primary, history, pi, backfill, t); + new_acting_primary, history, pi, t); } seastar::future<> PG::read_state(crimson::os::FuturizedStore* store) diff --git a/src/crimson/osd/pg.h b/src/crimson/osd/pg.h index 45958c4b8e2f..8ec5a06ebb65 100644 --- a/src/crimson/osd/pg.h +++ b/src/crimson/osd/pg.h @@ -465,7 +465,6 @@ public: int acting_primary, const pg_history_t& history, const PastIntervals& pim, - bool backfill, ceph::os::Transaction &t); seastar::future<> read_state(crimson::os::FuturizedStore* store); diff --git a/src/osd/OSD.cc b/src/osd/OSD.cc index 1cd3cf9fb20f..52101be2d0d9 100644 --- a/src/osd/OSD.cc +++ b/src/osd/OSD.cc @@ -4953,7 +4953,6 @@ PGRef OSD::handle_pg_create_info(const OSDMapRef& osdmap, acting_primary, info->history, info->past_intervals, - false, rctx.transaction); pg->init_collection_pool_opts(); diff --git a/src/osd/PG.cc b/src/osd/PG.cc index 82c2bf2bf8fd..d765995782cb 100644 --- a/src/osd/PG.cc +++ b/src/osd/PG.cc @@ -859,12 +859,11 @@ void PG::init( const vector& newacting, int new_acting_primary, const pg_history_t& history, const PastIntervals& pi, - bool backfill, ObjectStore::Transaction &t) { recovery_state.init( role, newup, new_up_primary, newacting, - new_acting_primary, history, pi, backfill, t); + new_acting_primary, history, pi, t); } void PG::shutdown() diff --git a/src/osd/PG.h b/src/osd/PG.h index 3ac023c1f846..b977c98e0565 100644 --- a/src/osd/PG.h +++ b/src/osd/PG.h @@ -337,7 +337,6 @@ public: int acting_primary, const pg_history_t& history, const PastIntervals& pim, - bool backfill, ObjectStore::Transaction &t); /// read existing pg state off disk diff --git a/src/osd/PeeringState.cc b/src/osd/PeeringState.cc index a1e59c4bcd72..5ae088482128 100644 --- a/src/osd/PeeringState.cc +++ b/src/osd/PeeringState.cc @@ -3862,7 +3862,6 @@ void PeeringState::init( const vector& newacting, int new_acting_primary, const pg_history_t& history, const PastIntervals& pi, - bool backfill, ObjectStore::Transaction &t) { psdout(10) << "init role " << role << " up " @@ -3891,13 +3890,6 @@ void PeeringState::init( pg_log.set_missing_may_contain_deletes(); } - if (backfill) { - psdout(10) << __func__ << ": Setting backfill" << dendl; - info.set_last_backfill(hobject_t()); - info.last_complete = info.last_update; - pg_log.mark_log_for_rewrite(); - } - on_new_interval(); dirty_info = true; diff --git a/src/osd/PeeringState.h b/src/osd/PeeringState.h index d8615ec5d07c..68237e4d8d09 100644 --- a/src/osd/PeeringState.h +++ b/src/osd/PeeringState.h @@ -1719,7 +1719,6 @@ public: const std::vector& newacting, int new_acting_primary, const pg_history_t& history, const PastIntervals& pi, - bool backfill, ObjectStore::Transaction &t); /// Init pg instance from disk state