]> git-server-git.apps.pok.os.sepia.ceph.com Git - ceph.git/commit
client: remove requests from closed MetaSession 690/head
authorSage Weil <sage@inktank.com>
Mon, 30 Sep 2013 21:44:17 +0000 (14:44 -0700)
committerSage Weil <sage@inktank.com>
Wed, 2 Oct 2013 21:42:43 +0000 (14:42 -0700)
commit721f1703a89d7ec629df2cbb368bee4bf5abfef6
tree539541d49c1c58d4826c6f9ddfb4c337ddd805ea
parent63f5814855d36e9e79a125c9a3321cea62d9dd1c
client: remove requests from closed MetaSession

If we get a CLOSED message on a session, remove/kick any requests on
that session before tearing it down.  Otherwise, we get a crash like

2013-09-26 03:51:44.704446 7f4d35a46700 10 client.4111 kick_requests for mds.0
2013-09-26 03:51:45.014156 7f4d35a46700 -1 ./include/xlist.h: In function 'xlist<T>::~xlist() [with T = MetaRequest*]' thread 7f4d35a46700 time 2013-09-26 03:51:44.751908
./include/xlist.h: 69: FAILED assert(_size == 0)

 ceph version 0.61.5 (8ee10dc4bb73bdd918873f29c70eedc3c7ef1979)
 1: (MetaSession::~MetaSession()+0x425) [0x4e0105]
 2: (Client::_closed_mds_session(MetaSession*)+0x116) [0x48a696]
 3: (Client::handle_client_session(MClientSession*)+0x2bb) [0x48bf5b]
 4: (Client::ms_dispatch(Message*)+0x56b) [0x4bfa0b]
 5: (DispatchQueue::entry()+0x3f1) [0x621b31]
 6: (DispatchQueue::DispatchThread::entry()+0xd) [0x6191bd]
 7: (()+0x7851) [0x7f4d3c168851]
 8: (clone()+0x6d) [0x7f4d3b09d90d]

Note that this can happen if we fail to reconnect do an MDS during its
reconnect interval.  If that happens, we probably have inodes in our
cache with no caps and things are generally not going to work very well.
This is but one step in improving the situation.

Separate out the two methods since they share little/no behavior.

Signed-off-by: Sage Weil <sage@inktank.com>
src/client/Client.cc
src/client/Client.h