summaryrefslogtreecommitdiff
path: root/src/mds/MDS.h
diff options
context:
space:
mode:
authorSage Weil <sage@inktank.com>2012-07-10 13:24:51 -0700
committerSage Weil <sage@inktank.com>2012-07-10 19:04:42 -0700
commita542d89ee592d08204ca6d4ba62d087aed1df0fc (patch)
treed9793e30f2552484752e2283d2b1fa700d845fe4 /src/mds/MDS.h
parent68bad03b2c5cfd6c670650258d60e04ee1dd3b93 (diff)
downloadceph-a542d89ee592d08204ca6d4ba62d087aed1df0fc.tar.gz
mds: fix race in connection accept; fix con replacement
We solve two problems with this patch. The first is that the messenger will now reuse an existing session's Connection with a new connection, which means that we don't want to change session->connection when we are validating an authorizer. Instead, set (but do not change) it. We also want to avoid a race where: - mds recovers, replays Sessions with no con's - multiple connection attempts for the same session race in the msgr - both are authorized, but out of order - Session->connection gets set to the losing attempt's Connection* Instead, we take advantage of an accept event that is called only for accepted winners. Signed-off-by: Sage Weil <sage@inktank.com> fixup
Diffstat (limited to 'src/mds/MDS.h')
-rw-r--r--src/mds/MDS.h1
1 files changed, 1 insertions, 0 deletions
diff --git a/src/mds/MDS.h b/src/mds/MDS.h
index 67a51028d9c..0d7383b2d04 100644
--- a/src/mds/MDS.h
+++ b/src/mds/MDS.h
@@ -315,6 +315,7 @@ class MDS : public Dispatcher {
bool ms_verify_authorizer(Connection *con, int peer_type,
int protocol, bufferlist& authorizer_data, bufferlist& authorizer_reply,
bool& isvalid);
+ void ms_handle_accept(Connection *con);
void ms_handle_connect(Connection *con);
bool ms_handle_reset(Connection *con);
void ms_handle_remote_reset(Connection *con);