]> git.apps.os.sepia.ceph.com Git - ceph.git/commitdiff
osd: PgPriorSet: do not include UP osds in prior.cur
authorSage Weil <sage@newdream.net>
Tue, 18 Oct 2011 00:02:23 +0000 (17:02 -0700)
committerSage Weil <sage@newdream.net>
Tue, 18 Oct 2011 00:44:15 +0000 (17:44 -0700)
The up osds are not (directly) relevant since they are not necessarily
members of the PG.  We only care about acting OSDs, which may have
committed writes to the PG during this past interval.

Signed-off-by: Sage Weil <sage@newdream.net>
src/osd/PG.cc
src/osd/PG.h

index 845593b89ce934d164db70a4726201b6a518d02b..2e4040d210f3ecc596342ee0b58def5caa45fbd2 100644 (file)
@@ -4879,11 +4879,18 @@ PG::PgPriorSet::PgPriorSet(int whoami,
    * If B is really dead, then an administrator will need to manually
    * intervene by marking the OSD as "lost."
    */
-  // current up and/or acting nodes, of course.
-  for (unsigned i=0; i<up.size(); i++)
-    cur.insert(up[i]);
+
+  // Include current acting and up nodes... not because they may
+  // contain old data (this interval hasn't gone active, obviously),
+  // but because we want their pg_info to inform choose_acting(), and
+  // so that we know what they do/do not have explicitly before
+  // sending them any new info/logs/whatever.
   for (unsigned i=0; i<acting.size(); i++)
     cur.insert(acting[i]);
+  // It may be possible to exlude the up nodes, but let's keep them in
+  // there for now.
+  for (unsigned i=0; i<up.size(); i++)
+    cur.insert(up[i]);
 
   // see if i have ever started since joining the pg.  this is important only
   // if we want to exclude lost osds.
@@ -4924,13 +4931,6 @@ PG::PgPriorSet::PgPriorSet(int whoami,
     int need_down = 0;
     bool any_is_alive_now = false;
 
-    // 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);
-    }
-
     // consider ACTING osds
     for (unsigned i=0; i<interval.acting.size(); i++) {
       int o = interval.acting[i];
index 98a3fa71d0810c570a2fc852575303df9e133262..7e3ae5a3c5aa1ffd9fbfeed1dc98b18aac8c2f68 100644 (file)
@@ -844,7 +844,7 @@ public:
 
   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>    down;  // down osds that would normally be in cur
     set<int>    lost;  // osds in the prior set which are lost
     bool crashed;   /// true if past osd failures were such that clients may need to replay requests.
     bool pg_down;   /// the DOWN state big for this pg will get set