]> git.apps.os.sepia.ceph.com Git - ceph.git/commitdiff
osd: PG_STATE_BACKFILL -> PG_STATE_BACKFILLING
authorSage Weil <sage@redhat.com>
Thu, 21 Sep 2017 14:30:57 +0000 (10:30 -0400)
committerSage Weil <sage@redhat.com>
Fri, 29 Sep 2017 16:53:59 +0000 (11:53 -0500)
Match user-facing string

Signed-off-by: Sage Weil <sage@redhat.com>
(cherry picked from commit 31a34946f7aa0ad2b9848cbc808d209394a9ad44)

- add update to mon/PGMap.cc

src/mgr/DaemonServer.cc
src/mon/PGMap.cc
src/osd/OSD.cc
src/osd/PG.cc
src/osd/PrimaryLogPG.cc
src/osd/osd_types.cc
src/osd/osd_types.h

index 34aac187181889e22e5131a9a5ad6d34eb127f24..d8d5bc39be554db2e6fd3415cbc5ae15ddc99ef4 100644 (file)
@@ -1148,7 +1148,7 @@ bool DaemonServer::handle_command(MCommand *m)
                  }
                  break;
                case OFR_BACKFILL:
-                 if ((workpg.state & (PG_STATE_DEGRADED | PG_STATE_BACKFILL_WAIT | PG_STATE_BACKFILL)) == 0) {
+                 if ((workpg.state & (PG_STATE_DEGRADED | PG_STATE_BACKFILL_WAIT | PG_STATE_BACKFILLING)) == 0) {
                    ss << "pg " << pstr << " doesn't require backfilling; ";
                    continue;
                  } else  if (workpg.state & PG_STATE_FORCED_BACKFILL) {
index fde038fc5806a866c5310e1321b0c0d4cc69fd01..5fae72c974cc41b01de5a27374346b4cae439b16 100644 (file)
@@ -3326,7 +3326,7 @@ void PGMap::get_health(
       note["incomplete"] += p->second;
     if (p->first & PG_STATE_BACKFILL_WAIT)
       note["backfill_wait"] += p->second;
-    if (p->first & PG_STATE_BACKFILL)
+    if (p->first & PG_STATE_BACKFILLING)
       note["backfilling"] += p->second;
     if (p->first & PG_STATE_BACKFILL_TOOFULL)
       note["backfill_toofull"] += p->second;
@@ -3431,7 +3431,7 @@ void PGMap::get_health(
                                PG_STATE_RECOVERY_TOOFULL |
                                PG_STATE_INCOMPLETE |
                                PG_STATE_BACKFILL_WAIT |
-                               PG_STATE_BACKFILL |
+                               PG_STATE_BACKFILLING |
                                PG_STATE_BACKFILL_TOOFULL)) &&
            stuck_pgs.count(p->first) == 0) {
          if (max > 0) {
index db1a93266f0d87d4c2656a88afe410a7ba766f5c..a77db0dc916c6d11470430a66f28c9d643f2506f 100644 (file)
@@ -9315,7 +9315,7 @@ void OSDService::adjust_pg_priorities(const vector<PGRef>& pgs, int newflags)
       i->lock();
       int pgstate = i->get_state();
       if ( ((newstate == PG_STATE_FORCED_RECOVERY) && (pgstate & (PG_STATE_DEGRADED | PG_STATE_RECOVERY_WAIT | PG_STATE_RECOVERING))) ||
-           ((newstate == PG_STATE_FORCED_BACKFILL) && (pgstate & (PG_STATE_DEGRADED | PG_STATE_BACKFILL_WAIT | PG_STATE_BACKFILL))) )
+           ((newstate == PG_STATE_FORCED_BACKFILL) && (pgstate & (PG_STATE_DEGRADED | PG_STATE_BACKFILL_WAIT | PG_STATE_BACKFILLING))) )
         i->_change_recovery_force_mode(newstate, false);
       i->unlock();
     }
@@ -9400,7 +9400,7 @@ void OSD::do_recovery(
       pg->discover_all_missing(*rctx.query_map);
       if (rctx.query_map->empty()) {
        string action;
-        if (pg->state_test(PG_STATE_BACKFILL)) {
+        if (pg->state_test(PG_STATE_BACKFILLING)) {
          auto evt = PG::CephPeeringEvtRef(new PG::CephPeeringEvt(
            queued,
            queued,
index 3c9b7417d642a4487bea37c7bbd8507b33963d5e..36d0aabfa8f523836773b6cffae5e7a6739dfdea 100644 (file)
@@ -6395,7 +6395,7 @@ PG::RecoveryState::Backfilling::Backfilling(my_context ctx)
   pg->queue_recovery();
   pg->state_clear(PG_STATE_BACKFILL_TOOFULL);
   pg->state_clear(PG_STATE_BACKFILL_WAIT);
-  pg->state_set(PG_STATE_BACKFILL);
+  pg->state_set(PG_STATE_BACKFILLING);
   pg->publish_stats_to_osd();
 }
 
@@ -6407,7 +6407,7 @@ PG::RecoveryState::Backfilling::react(const DeferBackfill &c)
   pg->osd->local_reserver.cancel_reservation(pg->info.pgid);
 
   pg->state_set(PG_STATE_BACKFILL_WAIT);
-  pg->state_clear(PG_STATE_BACKFILL);
+  pg->state_clear(PG_STATE_BACKFILLING);
 
   for (set<pg_shard_t>::iterator it = pg->backfill_targets.begin();
        it != pg->backfill_targets.end();
@@ -6467,7 +6467,7 @@ void PG::RecoveryState::Backfilling::exit()
   PG *pg = context< RecoveryMachine >().pg;
   pg->backfill_reserved = false;
   pg->backfill_reserving = false;
-  pg->state_clear(PG_STATE_BACKFILL);
+  pg->state_clear(PG_STATE_BACKFILLING);
   pg->state_clear(PG_STATE_FORCED_BACKFILL | PG_STATE_FORCED_RECOVERY);
   utime_t dur = ceph_clock_now() - enter_time;
   pg->osd->recoverystate_perf->tinc(rs_backfilling_latency, dur);
index 2877c28d67a618da2577b9b744aee684a599c3b9..2038ac300487ab1d1b65b2e8be7ded4618c60497 100644 (file)
@@ -717,7 +717,7 @@ void PrimaryLogPG::maybe_force_recovery()
   if (!is_degraded() &&
       !state_test(PG_STATE_RECOVERING |
                   PG_STATE_RECOVERY_WAIT |
-                 PG_STATE_BACKFILL |
+                 PG_STATE_BACKFILLING |
                  PG_STATE_BACKFILL_WAIT |
                  PG_STATE_BACKFILL_TOOFULL))
     return;
@@ -1553,7 +1553,7 @@ void PrimaryLogPG::calc_trim_to()
   if (is_degraded() ||
       state_test(PG_STATE_RECOVERING |
                 PG_STATE_RECOVERY_WAIT |
-                PG_STATE_BACKFILL |
+                PG_STATE_BACKFILLING |
                 PG_STATE_BACKFILL_WAIT |
                 PG_STATE_BACKFILL_TOOFULL)) {
     target = cct->_conf->osd_max_pg_log_entries;
@@ -11313,7 +11313,7 @@ bool PrimaryLogPG::start_recovery_ops(
   assert(is_primary());
 
   if (!state_test(PG_STATE_RECOVERING) &&
-      !state_test(PG_STATE_BACKFILL)) {
+      !state_test(PG_STATE_BACKFILLING)) {
     /* TODO: I think this case is broken and will make do_recovery()
      * unhappy since we're returning false */
     dout(10) << "recovery raced and were queued twice, ignoring!" << dendl;
@@ -11348,7 +11348,7 @@ bool PrimaryLogPG::start_recovery_ops(
 
   bool deferred_backfill = false;
   if (recovering.empty() &&
-      state_test(PG_STATE_BACKFILL) &&
+      state_test(PG_STATE_BACKFILLING) &&
       !backfill_targets.empty() && started < max &&
       missing.num_missing() == 0 &&
       waiting_on_backfill.empty()) {
@@ -11437,7 +11437,7 @@ bool PrimaryLogPG::start_recovery_ops(
             AllReplicasRecovered())));
     }
   } else { // backfilling
-    state_clear(PG_STATE_BACKFILL);
+    state_clear(PG_STATE_BACKFILLING);
     state_clear(PG_STATE_FORCED_BACKFILL);
     state_clear(PG_STATE_FORCED_RECOVERY);
     dout(10) << "recovery done, backfill done" << dendl;
index 22939c857a9bf7a53db2cb7d86d81ad6c568a6a6..078314960f640de89fa2a6607fa3c542c1dd23c0 100644 (file)
@@ -829,7 +829,7 @@ std::string pg_state_string(int state)
     oss << "repair+";
   if (state & PG_STATE_BACKFILL_WAIT)
     oss << "backfill_wait+";
-  if (state & PG_STATE_BACKFILL)
+  if (state & PG_STATE_BACKFILLING)
     oss << "backfilling+";
   if (state & PG_STATE_FORCED_BACKFILL)
     oss << "forced_backfill+";
@@ -887,7 +887,7 @@ int pg_string_state(const std::string& state)
   else if (state == "deep_scrub")
     type = PG_STATE_DEEP_SCRUB;
   else if (state == "backfilling")
-    type = PG_STATE_BACKFILL;
+    type = PG_STATE_BACKFILLING;
   else if (state == "forced_backfill")
     type = PG_STATE_FORCED_BACKFILL;
   else if (state == "backfill_toofull")
index 43d9a98e73753ea8bb14c45ba32f01ea19a24d0b..17f825cfd90ff0f84346b0620d0d0e04bb811573 100644 (file)
@@ -986,7 +986,7 @@ inline ostream& operator<<(ostream& out, const osd_stat_t& s) {
 #define PG_STATE_STALE        (1<<17) // our state for this pg is stale, unknown.
 #define PG_STATE_REMAPPED     (1<<18) // pg is explicitly remapped to different OSDs than CRUSH
 #define PG_STATE_DEEP_SCRUB   (1<<19) // deep scrub: check CRC32 on files
-#define PG_STATE_BACKFILL  (1<<20) // [active] backfilling pg content
+#define PG_STATE_BACKFILLING  (1<<20) // [active] backfilling pg content
 #define PG_STATE_BACKFILL_TOOFULL (1<<21) // backfill can't proceed: too full
 #define PG_STATE_RECOVERY_WAIT (1<<22) // waiting for recovery reservations
 #define PG_STATE_UNDERSIZED    (1<<23) // pg acting < pool size