Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 188715
b: refs/heads/master
c: 5ce6e9d
h: refs/heads/master
i:
  188713: 2f34247
  188711: f1f7363
v: v3
  • Loading branch information
Sage Weil committed Feb 17, 2010
1 parent d0bf389 commit a4d4092
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 17 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 85ff03f6bfef7d5b59ab3aefd4773f497ffad8a4
refs/heads/master: 5ce6e9dbe6805ab8ee67e21936d17f431adc63c6
29 changes: 13 additions & 16 deletions trunk/fs/ceph/mon_client.c
Original file line number Diff line number Diff line change
Expand Up @@ -95,6 +95,18 @@ int ceph_monmap_contains(struct ceph_monmap *m, struct ceph_entity_addr *addr)
return 0;
}

/*
* Send an auth request.
*/
static void __send_prepared_auth_request(struct ceph_mon_client *monc, int len)
{
monc->pending_auth = 1;
monc->m_auth->front.iov_len = len;
monc->m_auth->hdr.front_len = cpu_to_le32(len);
ceph_msg_get(monc->m_auth); /* keep our ref */
ceph_con_send(monc->con, monc->m_auth);
}

/*
* Close monitor session, if any.
*/
Expand Down Expand Up @@ -137,10 +149,7 @@ static int __open_session(struct ceph_mon_client *monc)
ret = ceph_auth_build_hello(monc->auth,
monc->m_auth->front.iov_base,
monc->m_auth->front_max);
monc->m_auth->front.iov_len = ret;
monc->m_auth->hdr.front_len = cpu_to_le32(ret);
ceph_msg_get(monc->m_auth); /* keep our ref */
ceph_con_send(monc->con, monc->m_auth);
__send_prepared_auth_request(monc, ret);
} else {
dout("open_session mon%d already open\n", monc->cur_mon);
}
Expand Down Expand Up @@ -507,11 +516,9 @@ static void delayed_work(struct work_struct *work)
__open_session(monc); /* continue hunting */
} else {
ceph_con_keepalive(monc->con);
mutex_unlock(&monc->mutex);

__validate_auth(monc);

mutex_lock(&monc->mutex);
if (monc->auth->ops->is_authenticated(monc->auth))
__send_subscribe(monc);
}
Expand Down Expand Up @@ -650,16 +657,6 @@ void ceph_monc_stop(struct ceph_mon_client *monc)
kfree(monc->monmap);
}

static void __send_prepared_auth_request(struct ceph_mon_client *monc, int len)
{
monc->pending_auth = 1;
monc->m_auth->front.iov_len = len;
monc->m_auth->hdr.front_len = cpu_to_le32(len);
ceph_msg_get(monc->m_auth); /* keep our ref */
ceph_con_send(monc->con, monc->m_auth);
}


static void handle_auth_reply(struct ceph_mon_client *monc,
struct ceph_msg *msg)
{
Expand Down

0 comments on commit a4d4092

Please sign in to comment.