]> git-server-git.apps.pok.os.sepia.ceph.com Git - ceph.git/commit
msg/Pipe: hold pipe_lock during important parts of accept()
authorSage Weil <sage@inktank.com>
Tue, 16 Jul 2013 20:13:46 +0000 (13:13 -0700)
committerSage Weil <sage@inktank.com>
Wed, 24 Jul 2013 23:20:37 +0000 (16:20 -0700)
commit806eab59ad1a32aedb662c51de3b4a1d61fcbb62
tree7e354876c26008d2897f6e3c464372f186f31414
parentce6a0b74459996f91a0511a4a7147179bcd47876
msg/Pipe: hold pipe_lock during important parts of accept()

Previously we did not bother with locking for accept() because we were
not visible to any other threads.  However, we need to close accepting
Pipes from mark_down_all(), which means we need to handle interference.

Fix up the locking so that we hold pipe_lock when looking at Pipe state
and verify that we are still in the ACCEPTING state any time we retake
the lock.

Signed-off-by: Sage Weil <sage@inktank.com>
(cherry picked from commit ecab4bb9513385bd765cca23e4e2fadb7ac4bac2)
src/msg/Pipe.cc