]> git.apps.os.sepia.ceph.com Git - ceph.git/commitdiff
osd: switching dispatch_running to be a counter
authorGreg Farnum <gregf@hq.newdream.net>
Tue, 3 Aug 2010 21:50:55 +0000 (14:50 -0700)
committerGreg Farnum <gregf@hq.newdream.net>
Tue, 3 Aug 2010 21:56:02 +0000 (14:56 -0700)
Now it works with multiple messengers dispatching.

src/osd/OSD.cc
src/osd/OSD.h

index f532b65270053dac2c7acb0ee35b3106a37bf452..c52a8b713f055b0522c74417af970c9ca0c29fe0 100644 (file)
@@ -1846,9 +1846,9 @@ bool OSD::ms_dispatch(Message *m)
 {
   // lock!
   osd_lock.Lock();
-  dispatch_running = true;
+  ++dispatch_running;
   _dispatch(m);
-  dispatch_running = false;
+  --dispatch_running;
   do_waiters();
   osd_lock.Unlock();
   return true;
index 8e86991f46a7a6e3fb70d1898afd82029bc176d9..462513cfcff21151b265231d71a9be6f94d2b09e 100644 (file)
@@ -130,7 +130,7 @@ protected:
     }
   };
 
-  bool dispatch_running;
+  int dispatch_running;
 
   void open_logger();
   void start_logger();