diff options
author | Sage Weil <sage@newdream.net> | 2009-12-14 14:56:56 -0800 |
---|---|---|
committer | Sage Weil <sage@newdream.net> | 2009-12-21 16:39:49 -0800 |
commit | 92ac41d0a4ab26fb68d3f841332e5d1f15d79123 (patch) | |
tree | 2dfc068efb3da472566b17d4587fe60c0b5e65cd /fs/ceph | |
parent | 5e095e8b40b0402ad3bcadc5b8d84c38b26c30b2 (diff) |
ceph: detect lossy state of connection
The server indicates whether a connection is lossy; set our LOSSYTX bit
appropriately. Do not set lossy bit on outgoing connections.
Signed-off-by: Sage Weil <sage@newdream.net>
Diffstat (limited to 'fs/ceph')
-rw-r--r-- | fs/ceph/messenger.c | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/fs/ceph/messenger.c b/fs/ceph/messenger.c index 98519bd33f0..986d8fb9c57 100644 --- a/fs/ceph/messenger.c +++ b/fs/ceph/messenger.c @@ -625,8 +625,6 @@ static void prepare_write_connect(struct ceph_messenger *msgr, con->out_connect.global_seq = cpu_to_le32(global_seq); con->out_connect.protocol_version = cpu_to_le32(proto); con->out_connect.flags = 0; - if (test_bit(LOSSYTX, &con->state)) - con->out_connect.flags = CEPH_MSG_CONNECT_LOSSY; if (!after_banner) { con->out_kvec_left = 0; @@ -1168,6 +1166,10 @@ static int process_connect(struct ceph_connection *con) con->connect_seq); WARN_ON(con->connect_seq != le32_to_cpu(con->in_reply.connect_seq)); + + if (con->in_reply.flags & CEPH_MSG_CONNECT_LOSSY) + set_bit(LOSSYTX, &con->state); + prepare_read_tag(con); break; |