aboutsummaryrefslogtreecommitdiffstats
path: root/fs/ceph
diff options
context:
space:
mode:
authorSage Weil <sage@newdream.net>2010-03-15 15:47:22 -0700
committerSage Weil <sage@newdream.net>2010-03-20 21:33:09 -0700
commit63733a0fc55cca74b1911769633dc5dfd1a45907 (patch)
treeb173d0f9a243dc4df463a8a73b64eabc26cec21c /fs/ceph
parent8b218b8a4a65bf4e304ae8690cadb9100ef029c0 (diff)
downloadkernel_samsung_crespo-63733a0fc55cca74b1911769633dc5dfd1a45907.zip
kernel_samsung_crespo-63733a0fc55cca74b1911769633dc5dfd1a45907.tar.gz
kernel_samsung_crespo-63733a0fc55cca74b1911769633dc5dfd1a45907.tar.bz2
ceph: fix authenticator timeout
We were failing to reconnect to services due to an old authenticator, even though we had the new ticket, because we weren't properly retrying the connect handshake, because we were calling an old/incorrect helper that left in_base_pos incorrect. The result was a failure to reconnect to the OSD or MDS (with an authentication error) if the MDS restarted after the service had been up a few hours (long enough for the original authenticator to be invalid). This was only a problem if the AUTH_X authentication was enabled. Now that the 'negotiate' and 'connect' stages are fully separated, we should use the prepare_read_connect() helper instead, and remove the obsolete one. Signed-off-by: Sage Weil <sage@newdream.net>
Diffstat (limited to 'fs/ceph')
-rw-r--r--fs/ceph/messenger.c9
1 files changed, 1 insertions, 8 deletions
diff --git a/fs/ceph/messenger.c b/fs/ceph/messenger.c
index 781656a..203c435 100644
--- a/fs/ceph/messenger.c
+++ b/fs/ceph/messenger.c
@@ -830,13 +830,6 @@ static void prepare_read_connect(struct ceph_connection *con)
con->in_base_pos = 0;
}
-static void prepare_read_connect_retry(struct ceph_connection *con)
-{
- dout("prepare_read_connect_retry %p\n", con);
- con->in_base_pos = strlen(CEPH_BANNER) + sizeof(con->actual_peer_addr)
- + sizeof(con->peer_addr_for_me);
-}
-
static void prepare_read_ack(struct ceph_connection *con)
{
dout("prepare_read_ack %p\n", con);
@@ -1146,7 +1139,7 @@ static int process_connect(struct ceph_connection *con)
}
con->auth_retry = 1;
prepare_write_connect(con->msgr, con, 0);
- prepare_read_connect_retry(con);
+ prepare_read_connect(con);
break;
case CEPH_MSGR_TAG_RESETSESSION: