]> git.apps.os.sepia.ceph.com Git - ceph.git/commitdiff
ebofs: avoid taking mutex recursively
authorSage Weil <sage@newdream.net>
Mon, 3 Nov 2008 03:46:00 +0000 (19:46 -0800)
committerSage Weil <sage@newdream.net>
Mon, 3 Nov 2008 03:48:58 +0000 (19:48 -0800)
src/ebofs/BlockDevice.h

index 161d81aeded7abdb46cbc4f08f70af28059555da..d4019ee1a3edaac3549d9dca2c9144aaf2a696d7 100644 (file)
@@ -288,6 +288,9 @@ class BlockDevice {
     root_queue.barrier();
     lock.Unlock();
   }
+  void _barrier() {
+    root_queue.barrier();
+  }
 
   // ** blocking interface **
 
@@ -303,7 +306,7 @@ class BlockDevice {
     
     lock.Lock();
     _submit_io(&bio);
-    barrier();         // need this, to prevent starvation!
+    _barrier();         // need this, to prevent starvation!
     while (!bio.done) 
       c.Wait(lock);
     lock.Unlock();
@@ -322,7 +325,7 @@ class BlockDevice {
 
     lock.Lock();
     _submit_io(&bio);
-    barrier();         // need this, to prevent starvation!
+    _barrier();         // need this, to prevent starvation!
     while (!bio.done) 
       c.Wait(lock);
     lock.Unlock();