libceph: add function that reset client's entity addr

This function also re-open connections to OSD/MON, and re-send in-flight
OSD requests after re-opening connections to OSD.

Signed-off-by: "Yan, Zheng" <zyan@redhat.com>
Reviewed-by: Jeff Layton <jlayton@kernel.org>
Signed-off-by: Ilya Dryomov <idryomov@gmail.com>
This commit is contained in:
Yan, Zheng
2019-07-25 20:16:39 +08:00
committed by Ilya Dryomov
parent e09580b343
commit 120a75ea9f
8 changed files with 43 additions and 0 deletions

View File

@@ -3031,6 +3031,12 @@ static void con_fault(struct ceph_connection *con)
}
void ceph_messenger_reset_nonce(struct ceph_messenger *msgr)
{
u32 nonce = le32_to_cpu(msgr->inst.addr.nonce) + 1000000;
msgr->inst.addr.nonce = cpu_to_le32(nonce);
encode_my_addr(msgr);
}
/*
* initialize a new messenger instance