]> git.apps.os.sepia.ceph.com Git - ceph.git/commitdiff
Revert "messenger: introduce a "halt_delivery" flag, checked by queue_delivery."
authorSage Weil <sage@newdream.net>
Mon, 18 Oct 2010 03:15:02 +0000 (20:15 -0700)
committerSage Weil <sage@newdream.net>
Mon, 18 Oct 2010 03:15:02 +0000 (20:15 -0700)
This reverts commit 69be0df61d29a093dbeadf6dbcd4e18b429d0a22.

src/msg/SimpleMessenger.cc
src/msg/SimpleMessenger.h

index fdd1e504d8193bd499118744d5e7fc4c0ea644b7..463226777dbf6ddcda01742bfa69a70531a9d5fa 100644 (file)
@@ -1272,7 +1272,7 @@ void SimpleMessenger::Pipe::discard_queue()
 {
   dout(10) << "discard_queue" << dendl;
   DispatchQueue& q = messenger->dispatch_queue;
-  halt_delivery = true;
+
   pipe_lock.Unlock();
   xlist<Pipe *>* list_on;
   q.lock.Lock();//to remove from round-robin
index 37825948d3c8dd2c7dc3d7c039680939a527b4ad..b4a0ef334cfa232309e305c0493f1a142f62e58a 100644 (file)
@@ -148,7 +148,6 @@ private:
     list<Message*> sent;
     Cond cond;
     bool keepalive;
-    bool halt_delivery; //if a pipe's queue is destroyed, stop adding to it
     
     __u32 connect_seq, peer_global_seq;
     uint64_t out_seq;
@@ -210,7 +209,7 @@ private:
       state(st), 
       connection_state(new Connection),
       reader_running(false), reader_joining(false), writer_running(false),
-      in_qlen(0), keepalive(false), halt_delivery(false),
+      in_qlen(0), keepalive(false),
       connect_seq(0), peer_global_seq(0),
       out_seq(0), in_seq(0), in_seq_acked(0),
       reader_thread(this), writer_thread(this) {
@@ -281,16 +280,9 @@ private:
     //Don't call while holding pipe_lock!
     void queue_received(Message *m, int priority) {
       list<Message *>& queue = in_q[priority];
-      bool was_empty;
+
       pipe_lock.Lock();
-      if (halt_delivery) {
-        if (m>(void *)5) // don't want to put local-delivery signals
-                         // this magic number should be larger than
-                         // the size of the D_CONNECT et al enum
-          m->put();
-        goto unlock_return;
-      }
-      was_empty = queue.empty();
+      bool was_empty = queue.empty();
       queue.push_back(m);
       if (was_empty) //this pipe isn't on the endpoint queue
        enqueue_me(priority);
@@ -301,7 +293,6 @@ private:
       ++messenger->dispatch_queue.qlen;
       messenger->dispatch_queue.qlen_lock.unlock();
 
-unlock_return:
       pipe_lock.Unlock();
     }