diff options
author | Sage Weil <sage@newdream.net> | 2010-04-01 16:07:23 -0700 |
---|---|---|
committer | Sage Weil <sage@newdream.net> | 2010-05-17 15:25:19 -0700 |
commit | bb257664f748bcfc80715f85f70f0f560caec3b4 (patch) | |
tree | 0f03c628328082e660c6a60f6094cde478dadec9 /fs/ceph/mon_client.c | |
parent | a79832f26be370ee26ea81eecdfd42d10e49d66a (diff) |
ceph: simplify ceph_msg_new
We only need to pass in front_len. Callers can attach any other payload
pieces (middle, data) as they see fit.
Signed-off-by: Sage Weil <sage@newdream.net>
Diffstat (limited to 'fs/ceph/mon_client.c')
-rw-r--r-- | fs/ceph/mon_client.c | 16 |
1 files changed, 7 insertions, 9 deletions
diff --git a/fs/ceph/mon_client.c b/fs/ceph/mon_client.c index 35f593e7e36..9900706fee7 100644 --- a/fs/ceph/mon_client.c +++ b/fs/ceph/mon_client.c @@ -191,7 +191,7 @@ static void __send_subscribe(struct ceph_mon_client *monc) struct ceph_mon_subscribe_item *i; void *p, *end; - msg = ceph_msg_new(CEPH_MSG_MON_SUBSCRIBE, 96, 0, 0, NULL); + msg = ceph_msg_new(CEPH_MSG_MON_SUBSCRIBE, 96); if (!msg) return; @@ -491,10 +491,10 @@ int ceph_monc_do_statfs(struct ceph_mon_client *monc, struct ceph_statfs *buf) init_completion(&req->completion); err = -ENOMEM; - req->request = ceph_msg_new(CEPH_MSG_STATFS, sizeof(*h), 0, 0, NULL); + req->request = ceph_msg_new(CEPH_MSG_STATFS, sizeof(*h)); if (!req->request) goto out; - req->reply = ceph_msg_new(CEPH_MSG_STATFS_REPLY, 1024, 0, 0, NULL); + req->reply = ceph_msg_new(CEPH_MSG_STATFS_REPLY, 1024); if (!req->reply) goto out; @@ -633,17 +633,15 @@ int ceph_monc_init(struct ceph_mon_client *monc, struct ceph_client *cl) /* msg pools */ err = -ENOMEM; monc->m_subscribe_ack = ceph_msg_new(CEPH_MSG_MON_SUBSCRIBE_ACK, - sizeof(struct ceph_mon_subscribe_ack), - 0, 0, NULL); + sizeof(struct ceph_mon_subscribe_ack)); if (!monc->m_subscribe_ack) goto out_monmap; - monc->m_auth_reply = ceph_msg_new(CEPH_MSG_AUTH_REPLY, 4096, 0, 0, - NULL); + monc->m_auth_reply = ceph_msg_new(CEPH_MSG_AUTH_REPLY, 4096); if (!monc->m_auth_reply) goto out_subscribe_ack; - monc->m_auth = ceph_msg_new(CEPH_MSG_AUTH, 4096, 0, 0, NULL); + monc->m_auth = ceph_msg_new(CEPH_MSG_AUTH, 4096); monc->pending_auth = 0; if (!monc->m_auth) goto out_auth_reply; @@ -818,7 +816,7 @@ static struct ceph_msg *mon_alloc_msg(struct ceph_connection *con, case CEPH_MSG_MON_MAP: case CEPH_MSG_MDS_MAP: case CEPH_MSG_OSD_MAP: - m = ceph_msg_new(type, front_len, 0, 0, NULL); + m = ceph_msg_new(type, front_len); break; } |