From: Sage Weil Date: Thu, 11 May 2017 23:57:55 +0000 (-0500) Subject: osd/PG: drop pre-firefly compat_mode for choose_*_acting X-Git-Tag: v12.1.0~10^2~105^2 X-Git-Url: http://git-server-git.apps.pok.os.sepia.ceph.com/?a=commitdiff_plain;h=refs%2Fpull%2F15057%2Fhead;p=ceph.git osd/PG: drop pre-firefly compat_mode for choose_*_acting Signed-off-by: Sage Weil --- diff --git a/src/common/config_opts.h b/src/common/config_opts.h index ae8ddca5fd69..e8e6ec71deb3 100644 --- a/src/common/config_opts.h +++ b/src/common/config_opts.h @@ -988,9 +988,6 @@ OPTION(osd_max_omap_bytes_per_request, OPT_U64, 1<<30) OPTION(osd_objectstore, OPT_STR, "filestore") // ObjectStore backend type OPTION(osd_objectstore_tracing, OPT_BOOL, false) // true if LTTng-UST tracepoints should be enabled -// Override maintaining compatibility with older OSDs -// Set to true for testing. Users should NOT set this. -OPTION(osd_debug_override_acting_compat, OPT_BOOL, false) OPTION(osd_objectstore_fuse, OPT_BOOL, false) OPTION(osd_bench_small_size_max_iops, OPT_U32, 100) // 100 IOPS diff --git a/src/osd/PG.cc b/src/osd/PG.cc index 81fbe9ad942f..7fa19d86bb00 100644 --- a/src/osd/PG.cc +++ b/src/osd/PG.cc @@ -1122,7 +1122,6 @@ void PG::calc_ec_acting( const vector &up, pg_shard_t up_primary, const map &all_info, - bool compat_mode, bool restrict_to_up_acting, vector *_want, set *backfill, @@ -1210,7 +1209,6 @@ void PG::calc_replicated_acting( const vector &up, pg_shard_t up_primary, const map &all_info, - bool compat_mode, bool restrict_to_up_acting, vector *want, set *backfill, @@ -1264,16 +1262,8 @@ void PG::calc_replicated_acting( * as far backwards as necessary to pick up any peers which can * be log recovered by auth_log_shard's log */ ss << " shard " << up_cand << " (up) backfill " << cur_info << std::endl; - if (compat_mode) { - if (backfill->empty()) { - backfill->insert(up_cand); - want->push_back(*i); - acting_backfill->insert(up_cand); - } - } else { - backfill->insert(up_cand); - acting_backfill->insert(up_cand); - } + backfill->insert(up_cand); + acting_backfill->insert(up_cand); } else { want->push_back(*i); acting_backfill->insert(up_cand); @@ -1393,27 +1383,6 @@ bool PG::choose_acting(pg_shard_t &auth_log_shard_id, assert(!auth_log_shard->second.is_incomplete()); auth_log_shard_id = auth_log_shard->first; - // Determine if compatibility needed - bool compat_mode = !cct->_conf->osd_debug_override_acting_compat; - if (compat_mode) { - bool all_support = true; - OSDMapRef osdmap = get_osdmap(); - - for (map::iterator it = all_info.begin(); - it != all_info.end(); - ++it) { - pg_shard_t peer = it->first; - - const osd_xinfo_t& xi = osdmap->get_xinfo(peer.osd); - if (!(xi.features & CEPH_FEATURE_OSD_ERASURE_CODES)) { - all_support = false; - break; - } - } - if (all_support) - compat_mode = false; - } - set want_backfill, want_acting_backfill; vector want; pg_shard_t want_primary; @@ -1427,7 +1396,6 @@ bool PG::choose_acting(pg_shard_t &auth_log_shard_id, up, up_primary, all_info, - compat_mode, restrict_to_up_acting, &want, &want_backfill, @@ -1443,7 +1411,6 @@ bool PG::choose_acting(pg_shard_t &auth_log_shard_id, up, up_primary, all_info, - compat_mode, restrict_to_up_acting, &want, &want_backfill, @@ -1492,7 +1459,7 @@ bool PG::choose_acting(pg_shard_t &auth_log_shard_id, if (want_acting == up) { // There can't be any pending backfill if // want is the same as crush map up OSDs. - assert(compat_mode || want_backfill.empty()); + assert(want_backfill.empty()); vector empty; osd->queue_want_pg_temp(info.pgid.pgid, empty); } else diff --git a/src/osd/PG.h b/src/osd/PG.h index 5493a5004ea5..f6ce044f79eb 100644 --- a/src/osd/PG.h +++ b/src/osd/PG.h @@ -1080,7 +1080,6 @@ public: const vector &up, pg_shard_t up_primary, const map &all_info, - bool compat_mode, bool restrict_to_up_acting, vector *want, set *backfill, @@ -1095,7 +1094,6 @@ public: const vector &up, pg_shard_t up_primary, const map &all_info, - bool compat_mode, bool restrict_to_up_acting, vector *want, set *backfill,