]> git-server-git.apps.pok.os.sepia.ceph.com Git - ceph.git/commitdiff
osd/PG: drop pre-firefly compat_mode for choose_*_acting 15057/head
authorSage Weil <sage@redhat.com>
Thu, 11 May 2017 23:57:55 +0000 (18:57 -0500)
committerSage Weil <sage@redhat.com>
Thu, 11 May 2017 23:57:55 +0000 (18:57 -0500)
Signed-off-by: Sage Weil <sage@redhat.com>
src/common/config_opts.h
src/osd/PG.cc
src/osd/PG.h

index ae8ddca5fd69dfb0021f0e774492f4394280e0fa..e8e6ec71deb3e0297ce43134c744e19f5129bedf 100644 (file)
@@ -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
index 81fbe9ad942f8abe0b056b65c86ecba62435355b..7fa19d86bb000cb81375b79dee916505b14d0353 100644 (file)
@@ -1122,7 +1122,6 @@ void PG::calc_ec_acting(
   const vector<int> &up,
   pg_shard_t up_primary,
   const map<pg_shard_t, pg_info_t> &all_info,
-  bool compat_mode,
   bool restrict_to_up_acting,
   vector<int> *_want,
   set<pg_shard_t> *backfill,
@@ -1210,7 +1209,6 @@ void PG::calc_replicated_acting(
   const vector<int> &up,
   pg_shard_t up_primary,
   const map<pg_shard_t, pg_info_t> &all_info,
-  bool compat_mode,
   bool restrict_to_up_acting,
   vector<int> *want,
   set<pg_shard_t> *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<pg_shard_t, pg_info_t>::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<pg_shard_t> want_backfill, want_acting_backfill;
   vector<int> 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<int> empty;
       osd->queue_want_pg_temp(info.pgid.pgid, empty);
     } else
index 5493a5004ea5f4f80442431bcf619cbbe42401a5..f6ce044f79eb7adc76bf99f5da3b9329953ccddf 100644 (file)
@@ -1080,7 +1080,6 @@ public:
     const vector<int> &up,
     pg_shard_t up_primary,
     const map<pg_shard_t, pg_info_t> &all_info,
-    bool compat_mode,
     bool restrict_to_up_acting,
     vector<int> *want,
     set<pg_shard_t> *backfill,
@@ -1095,7 +1094,6 @@ public:
     const vector<int> &up,
     pg_shard_t up_primary,
     const map<pg_shard_t, pg_info_t> &all_info,
-    bool compat_mode,
     bool restrict_to_up_acting,
     vector<int> *want,
     set<pg_shard_t> *backfill,