]> git-server-git.apps.pok.os.sepia.ceph.com Git - ceph.git/commitdiff
osd: some PgPriorSet comments, trivial cleanups, new FIXME
authorSage Weil <sage.weil@dreamhost.com>
Mon, 26 Sep 2011 03:56:56 +0000 (20:56 -0700)
committerSage Weil <sage.weil@dreamhost.com>
Wed, 28 Sep 2011 04:03:28 +0000 (21:03 -0700)
Signed-off-by: Sage Weil <sage.weil@dreamhost.com>
src/osd/PG.cc
src/osd/PG.h

index a4da595b4d975bed486fb85ec49ea078f625576d..d24446cc05f7f0e9085ed9a7e451972f3841f06c 100644 (file)
@@ -4888,6 +4888,8 @@ PG::PgPriorSet::PgPriorSet(int whoami,
 
   // see if i have ever started since joining the pg.  this is important only
   // if we want to exclude lost osds.
+  // FIXME: this check is broken.  it is probably better than nothing (which would allow
+  // us to go active with an empty PG), but it needs a closer look!
   set<int> started_since_joining;
   for (vector<int>::const_iterator q = acting.begin(); q != acting.end(); q++) {
     int o = *q;
@@ -4900,14 +4902,13 @@ PG::PgPriorSet::PgPriorSet(int whoami,
        break;  // we don't care
       if (!interval.maybe_went_rw)
        continue;
-      if (std::find(interval.acting.begin(), interval.acting.end(), o)
-         != interval.acting.end())
+      if (std::find(interval.acting.begin(), interval.acting.end(), o) != interval.acting.end())
        started_since_joining.insert(o);
       break;
     }
   }
-
-  dout(10) << "build_prior " << started_since_joining << " have started since joining this pg" << dendl;
+  dout(10) << "build_prior osds <" << started_since_joining
+          << "> have started since joining this pg" << dendl;
 
   for (map<epoch_t,Interval>::const_reverse_iterator p = past_intervals.rbegin();
        p != past_intervals.rend();
@@ -4927,7 +4928,6 @@ PG::PgPriorSet::PgPriorSet(int whoami,
     // consider UP osds
     for (unsigned i=0; i<interval.up.size(); i++) {
       int o = interval.up[i];
-
       if (osdmap.is_up(o)) // is up now
        cur.insert(o);
     }
index 14a5a8fb734bd93659ced87ffd6eeefd32541cbc..7953a61c8d1cbb48e3a52348cfb064bbb3ce390f 100644 (file)
@@ -834,13 +834,14 @@ public:
   bool        have_master_log;
  protected:
   bool prior_set_built;
+
   struct PgPriorSet {
     set<int>    cur;   // current+prior OSDs, as defined by info.history.last_epoch_started.
     set<int>    down;  // down osds normally exluded from cur
     set<int>    lost;  // osds in the prior set which are lost
     map<int,epoch_t> up_thru;  // osds whose up_thru we care about
     vector<Interval> inter_up_thru;  // intervals whose up_thru we care about
-    bool crashed;
+    bool crashed;   /// true if past osd failures were such that clients may need to replay requests.
     bool pg_down;
     bool some_down;
     const PG *pg;