]> git.apps.os.sepia.ceph.com Git - ceph.git/commitdiff
osd: fix OpWQ dump locking
authorSage Weil <sage@inktank.com>
Tue, 18 Mar 2014 20:20:56 +0000 (13:20 -0700)
committerSage Weil <sage@inktank.com>
Tue, 18 Mar 2014 20:22:34 +0000 (13:22 -0700)
The pqueue is protected by the wq lock, not by qlock; for example, see
OpWQ::_enqueue.  qlock protects the pg_for_processing map only.

Fixes: #7735
Signed-off-by: Sage Weil <sage@inktank.com>
src/osd/OSD.h

index 7ee3442793c7cbe51316f91c25a4e6b505a4c9f1..4c72e42cad6cde2d222c4f8ca2d99afe8e90fbc0 100644 (file)
@@ -1114,8 +1114,9 @@ private:
     {}
 
     void dump(Formatter *f) {
-      Mutex::Locker l(qlock);
+      lock();
       pqueue.dump(f);
+      unlock();
     }
 
     void _enqueue_front(pair<PGRef, OpRequestRef> item);