]> git.apps.os.sepia.ceph.com Git - ceph.git/commit
msgr: fix race on Pipe removal from hash
authorSage Weil <sage@inktank.com>
Sun, 23 Dec 2012 17:22:18 +0000 (09:22 -0800)
committerSage Weil <sage@inktank.com>
Sat, 29 Dec 2012 01:21:00 +0000 (17:21 -0800)
commite99b4a307b4427945a4eb5ec50e65d6239af4337
treeed9c9b07b92c4678e98b69e52cd8c8a086ee71db
parent6339c5d43974f4b495f15d199e01a141e74235f5
msgr: fix race on Pipe removal from hash

When a pipe is faulting and shutting down, we have to drop pipe_lock to
take msgr lock and then remove the entry.  The Pipe in this case will
have STATE_CLOSED.  Handle this case in all places we do a lookup on
the rank_pipe hash so that we effectively ignore entries that are
CLOSED.

This fixes a race introduced by the previous commit where we won't use
the CLOSED pipe and try to register a new one, but the old one is still
registered.

See bug #3675.

Signed-off-by: Sage Weil <sage@inktank.com>
src/msg/Pipe.cc
src/msg/SimpleMessenger.cc
src/msg/SimpleMessenger.h