aboutsummaryrefslogtreecommitdiffstats
path: root/fs
diff options
context:
space:
mode:
Diffstat (limited to 'fs')
-rw-r--r--fs/ceph/mon_client.c19
-rw-r--r--fs/ceph/mon_client.h5
2 files changed, 14 insertions, 10 deletions
diff --git a/fs/ceph/mon_client.c b/fs/ceph/mon_client.c
index 43cfab06fcee..5a67732fa6e1 100644
--- a/fs/ceph/mon_client.c
+++ b/fs/ceph/mon_client.c
@@ -638,16 +638,21 @@ int ceph_monc_init(struct ceph_mon_client *monc, struct ceph_client *cl)
638 sizeof(struct ceph_mon_subscribe_ack), 1, false); 638 sizeof(struct ceph_mon_subscribe_ack), 1, false);
639 if (err < 0) 639 if (err < 0)
640 goto out_monmap; 640 goto out_monmap;
641 err = ceph_msgpool_init(&monc->msgpool_auth_reply, 4096, 1, false); 641
642 if (err < 0) 642 monc->m_auth_reply = ceph_msg_new(CEPH_MSG_AUTH_REPLY, 4096, 0, 0,
643 NULL);
644 if (IS_ERR(monc->m_auth_reply)) {
645 err = PTR_ERR(monc->m_auth_reply);
646 monc->m_auth_reply = NULL;
643 goto out_pool; 647 goto out_pool;
648 }
644 649
645 monc->m_auth = ceph_msg_new(CEPH_MSG_AUTH, 4096, 0, 0, NULL); 650 monc->m_auth = ceph_msg_new(CEPH_MSG_AUTH, 4096, 0, 0, NULL);
646 monc->pending_auth = 0; 651 monc->pending_auth = 0;
647 if (IS_ERR(monc->m_auth)) { 652 if (IS_ERR(monc->m_auth)) {
648 err = PTR_ERR(monc->m_auth); 653 err = PTR_ERR(monc->m_auth);
649 monc->m_auth = NULL; 654 monc->m_auth = NULL;
650 goto out_pool3; 655 goto out_auth_reply;
651 } 656 }
652 657
653 monc->cur_mon = -1; 658 monc->cur_mon = -1;
@@ -665,8 +670,8 @@ int ceph_monc_init(struct ceph_mon_client *monc, struct ceph_client *cl)
665 monc->want_next_osdmap = 1; 670 monc->want_next_osdmap = 1;
666 return 0; 671 return 0;
667 672
668out_pool3: 673out_auth_reply:
669 ceph_msgpool_destroy(&monc->msgpool_auth_reply); 674 ceph_msg_put(monc->m_auth_reply);
670out_pool: 675out_pool:
671 ceph_msgpool_destroy(&monc->msgpool_subscribe_ack); 676 ceph_msgpool_destroy(&monc->msgpool_subscribe_ack);
672out_monmap: 677out_monmap:
@@ -692,8 +697,8 @@ void ceph_monc_stop(struct ceph_mon_client *monc)
692 ceph_auth_destroy(monc->auth); 697 ceph_auth_destroy(monc->auth);
693 698
694 ceph_msg_put(monc->m_auth); 699 ceph_msg_put(monc->m_auth);
700 ceph_msg_put(monc->m_auth_reply);
695 ceph_msgpool_destroy(&monc->msgpool_subscribe_ack); 701 ceph_msgpool_destroy(&monc->msgpool_subscribe_ack);
696 ceph_msgpool_destroy(&monc->msgpool_auth_reply);
697 702
698 kfree(monc->monmap); 703 kfree(monc->monmap);
699} 704}
@@ -815,7 +820,7 @@ static struct ceph_msg *mon_alloc_msg(struct ceph_connection *con,
815 case CEPH_MSG_STATFS_REPLY: 820 case CEPH_MSG_STATFS_REPLY:
816 return get_statfs_reply(con, hdr, skip); 821 return get_statfs_reply(con, hdr, skip);
817 case CEPH_MSG_AUTH_REPLY: 822 case CEPH_MSG_AUTH_REPLY:
818 m = ceph_msgpool_get(&monc->msgpool_auth_reply, front_len); 823 m = ceph_msg_get(monc->m_auth_reply);
819 break; 824 break;
820 case CEPH_MSG_MON_MAP: 825 case CEPH_MSG_MON_MAP:
821 case CEPH_MSG_MDS_MAP: 826 case CEPH_MSG_MDS_MAP:
diff --git a/fs/ceph/mon_client.h b/fs/ceph/mon_client.h
index cc89a86c8589..2658e3e3b27c 100644
--- a/fs/ceph/mon_client.h
+++ b/fs/ceph/mon_client.h
@@ -63,7 +63,7 @@ struct ceph_mon_client {
63 struct delayed_work delayed_work; 63 struct delayed_work delayed_work;
64 64
65 struct ceph_auth_client *auth; 65 struct ceph_auth_client *auth;
66 struct ceph_msg *m_auth; 66 struct ceph_msg *m_auth, *m_auth_reply;
67 int pending_auth; 67 int pending_auth;
68 68
69 bool hunting; 69 bool hunting;
@@ -72,9 +72,8 @@ struct ceph_mon_client {
72 struct ceph_connection *con; 72 struct ceph_connection *con;
73 bool have_fsid; 73 bool have_fsid;
74 74
75 /* msg pools */ 75 /* msgs */
76 struct ceph_msgpool msgpool_subscribe_ack; 76 struct ceph_msgpool msgpool_subscribe_ack;
77 struct ceph_msgpool msgpool_auth_reply;
78 77
79 /* pending statfs requests */ 78 /* pending statfs requests */
80 struct rb_root statfs_request_tree; 79 struct rb_root statfs_request_tree;