diff options
author | Sage Weil <sage@inktank.com> | 2012-07-30 19:21:17 -0400 |
---|---|---|
committer | Sage Weil <sage@inktank.com> | 2012-07-30 21:15:32 -0400 |
commit | a53aab645c82f0146e35684b34692c69b5118121 (patch) | |
tree | c066e9d7a670af46a2282d88c4a8a51912a98c7c /fs/ceph | |
parent | a4107026976f06c9a6ce8cc84a763564ee39d901 (diff) |
ceph: close old con before reopening on mds reconnect
When we detect a mds session reset, close the old ceph_connection before
reopening it. This ensures we clean up the old socket properly and keep
the ceph_connection state correct.
Signed-off-by: Sage Weil <sage@inktank.com>
Reviewed-by: Alex Elder <elder@inktank.com>
Reviewed-by: Yehuda Sadeh <yehuda@inktank.com>
Diffstat (limited to 'fs/ceph')
-rw-r--r-- | fs/ceph/mds_client.c | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/fs/ceph/mds_client.c b/fs/ceph/mds_client.c index 39b76d66bc5d..a5a735422aa7 100644 --- a/fs/ceph/mds_client.c +++ b/fs/ceph/mds_client.c | |||
@@ -2518,6 +2518,7 @@ static void send_mds_reconnect(struct ceph_mds_client *mdsc, | |||
2518 | session->s_state = CEPH_MDS_SESSION_RECONNECTING; | 2518 | session->s_state = CEPH_MDS_SESSION_RECONNECTING; |
2519 | session->s_seq = 0; | 2519 | session->s_seq = 0; |
2520 | 2520 | ||
2521 | ceph_con_close(&session->s_con); | ||
2521 | ceph_con_open(&session->s_con, | 2522 | ceph_con_open(&session->s_con, |
2522 | CEPH_ENTITY_TYPE_MDS, mds, | 2523 | CEPH_ENTITY_TYPE_MDS, mds, |
2523 | ceph_mdsmap_get_addr(mdsc->mdsmap, mds)); | 2524 | ceph_mdsmap_get_addr(mdsc->mdsmap, mds)); |