summaryrefslogtreecommitdiff
path: root/net/ceph/mon_client.c
diff options
context:
space:
mode:
authorYan, Zheng <zyan@redhat.com>2019-07-25 15:16:39 +0300
committerIlya Dryomov <idryomov@gmail.com>2019-09-16 13:06:23 +0300
commit120a75ea9f4ba02f852171e75d44f29139b9c83e (patch)
tree6944f51971e6adea422725866c0e81e5249ebc18 /net/ceph/mon_client.c
parente09580b343aa117fd07c1bb7f7dfc5bc630a2953 (diff)
downloadlinux-120a75ea9f4ba02f852171e75d44f29139b9c83e.tar.xz
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>
Diffstat (limited to 'net/ceph/mon_client.c')
-rw-r--r--net/ceph/mon_client.c7
1 files changed, 7 insertions, 0 deletions
diff --git a/net/ceph/mon_client.c b/net/ceph/mon_client.c
index 0520bf9825aa..7256c402ebaa 100644
--- a/net/ceph/mon_client.c
+++ b/net/ceph/mon_client.c
@@ -213,6 +213,13 @@ static void reopen_session(struct ceph_mon_client *monc)
__open_session(monc);
}
+void ceph_monc_reopen_session(struct ceph_mon_client *monc)
+{
+ mutex_lock(&monc->mutex);
+ reopen_session(monc);
+ mutex_unlock(&monc->mutex);
+}
+
static void un_backoff(struct ceph_mon_client *monc)
{
monc->hunt_mult /= 2; /* reduce by 50% */