]> git.baikalelectronics.ru Git - kernel.git/commit
libceph: pick a different monitor when reconnecting
authorIlya Dryomov <idryomov@gmail.com>
Wed, 20 Jan 2016 16:50:31 +0000 (17:50 +0100)
committerIlya Dryomov <idryomov@gmail.com>
Fri, 25 Mar 2016 17:51:38 +0000 (18:51 +0100)
commitc1d1874731cec672d11651006c09170bd3ec6d4b
treebc0ee4c6236224b44f9e388672e2e0a1cbfe8253
parent49d458ad6a58981c9df7f746cd64dfdc1a392a96
libceph: pick a different monitor when reconnecting

Don't try to reconnect to the same monitor when we fail to establish
a session within a timeout or it's lost.

For that, pick_new_mon() needs to see the old value of cur_mon, so
don't clear it in __close_session() - all calls to __close_session()
but one are followed by __open_session() anyway.  __open_session() is
only called when a new session needs to be established, so the "already
open?" branch, which is now in the way, is simply dropped.

Signed-off-by: Ilya Dryomov <idryomov@gmail.com>
net/ceph/mon_client.c