diff options
author | Sage Weil <sage@newdream.net> | 2010-02-26 16:55:51 -0500 |
---|---|---|
committer | Sage Weil <sage@newdream.net> | 2010-03-01 18:19:51 -0500 |
commit | 1679f876a641d209e7b22e43ebda0693c71003cf (patch) | |
tree | 6cb4ba61dac343c093d7a428c48a2bb7619f0a31 /fs/ceph/messenger.c | |
parent | 080af17e9c6360c5a835528e8de3141a46273ed2 (diff) |
ceph: reset bits on connection close
Clear LOSSYTX bit, so that if/when we reconnect, said reconnect
will retry on failure.
Clear _PENDING bits too, to avoid polluting subsequent
connection state.
Drop unused REGISTERED bit.
Signed-off-by: Sage Weil <sage@newdream.net>
Diffstat (limited to 'fs/ceph/messenger.c')
-rw-r--r-- | fs/ceph/messenger.c | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/fs/ceph/messenger.c b/fs/ceph/messenger.c index 0ddc2c75f6b4..bf4590c77cf6 100644 --- a/fs/ceph/messenger.c +++ b/fs/ceph/messenger.c | |||
@@ -342,6 +342,9 @@ void ceph_con_close(struct ceph_connection *con) | |||
342 | dout("con_close %p peer %s\n", con, pr_addr(&con->peer_addr.in_addr)); | 342 | dout("con_close %p peer %s\n", con, pr_addr(&con->peer_addr.in_addr)); |
343 | set_bit(CLOSED, &con->state); /* in case there's queued work */ | 343 | set_bit(CLOSED, &con->state); /* in case there's queued work */ |
344 | clear_bit(STANDBY, &con->state); /* avoid connect_seq bump */ | 344 | clear_bit(STANDBY, &con->state); /* avoid connect_seq bump */ |
345 | clear_bit(LOSSYTX, &con->state); /* so we retry next connect */ | ||
346 | clear_bit(KEEPALIVE_PENDING, &con->state); | ||
347 | clear_bit(WRITE_PENDING, &con->state); | ||
345 | mutex_lock(&con->mutex); | 348 | mutex_lock(&con->mutex); |
346 | reset_connection(con); | 349 | reset_connection(con); |
347 | cancel_delayed_work(&con->work); | 350 | cancel_delayed_work(&con->work); |