]> git-server-git.apps.pok.os.sepia.ceph.com Git - ceph.git/commitdiff
Merge pull request #1944 from athanatos/wip-8396
authorGregory Farnum <greg@inktank.com>
Wed, 25 Jun 2014 17:02:41 +0000 (10:02 -0700)
committerGregory Farnum <greg@inktank.com>
Wed, 25 Jun 2014 17:02:41 +0000 (10:02 -0700)
Move the waiting_for_pg list down into the Sessions, and coordinate the updates so that we don't get races
between the Pipe and handle_map threads.

Fixes: #8396
Fixes: #8505
Reviewed-by: Greg Farnum <greg@inktank.com>
1  2 
src/osd/OSD.cc
src/osd/OSD.h
src/osd/PG.cc
src/osd/PG.h

diff --cc src/osd/OSD.cc
Simple merge
diff --cc src/osd/OSD.h
index 1e7923e7a75f084e10f7769b2fdd3e433bb104e3,96b264950627568e1844234c5da331afd20f3900..de6fd161bbbb830b77716f3a438c81d3db21437f
@@@ -1090,10 -1094,37 +1091,39 @@@ private
  
    bool paused_recovery;
  
 +  void set_disk_tp_priority();
 +
    // -- sessions --
  public:
+   static bool split_request(OpRequestRef op, unsigned match, unsigned bits) {
+     unsigned mask = ~((~0)<<bits);
+     switch (op->get_req()->get_type()) {
+     case CEPH_MSG_OSD_OP:
+       return (static_cast<MOSDOp*>(
+               op->get_req())->get_pg().m_seed & mask) == match;
+     }
+     return false;
+   }
+   static void split_list(
+     list<OpRequestRef> *from,
+     list<OpRequestRef> *to,
+     unsigned match,
+     unsigned bits) {
+     for (list<OpRequestRef>::iterator i = from->begin();
+        i != from->end();
+       ) {
+       if (split_request(*i, match, bits)) {
+       to->push_back(*i);
+       from->erase(i++);
+       } else {
+       ++i;
+       }
+     }
+   }
    struct Session : public RefCountedObject {
      EntityName entity_name;
      OSDCap caps;
diff --cc src/osd/PG.cc
Simple merge
diff --cc src/osd/PG.h
Simple merge