aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorIlya Dryomov <ilya.dryomov@inktank.com>2014-01-09 13:08:21 -0500
committerIlya Dryomov <ilya.dryomov@inktank.com>2014-01-14 04:27:26 -0500
commit3cea4c3071d4e55e9d7356efe9d0ebf92f0c2204 (patch)
treed15ca5e0ac92ae2a03faad7f7b6a8b9cbb8c3b9c
parentf48db1e9ac6f1578ab7efef9f66c70279e2f0cb5 (diff)
libceph: rename ceph_msg::front_max to front_alloc_len
Rename front_max field of struct ceph_msg to front_alloc_len to make its purpose more clear. Signed-off-by: Ilya Dryomov <ilya.dryomov@inktank.com> Reviewed-by: Sage Weil <sage@inktank.com>
-rw-r--r--include/linux/ceph/messenger.h2
-rw-r--r--net/ceph/messenger.c6
-rw-r--r--net/ceph/mon_client.c8
3 files changed, 8 insertions, 8 deletions
diff --git a/include/linux/ceph/messenger.h b/include/linux/ceph/messenger.h
index c1d3f5a65273..861138f7c161 100644
--- a/include/linux/ceph/messenger.h
+++ b/include/linux/ceph/messenger.h
@@ -157,7 +157,7 @@ struct ceph_msg {
157 bool front_is_vmalloc; 157 bool front_is_vmalloc;
158 bool more_to_follow; 158 bool more_to_follow;
159 bool needs_out_seq; 159 bool needs_out_seq;
160 int front_max; 160 int front_alloc_len;
161 unsigned long ack_stamp; /* tx: when we were acked */ 161 unsigned long ack_stamp; /* tx: when we were acked */
162 162
163 struct ceph_msgpool *pool; 163 struct ceph_msgpool *pool;
diff --git a/net/ceph/messenger.c b/net/ceph/messenger.c
index d2cadb5b2b63..f4d411c017e7 100644
--- a/net/ceph/messenger.c
+++ b/net/ceph/messenger.c
@@ -3130,7 +3130,7 @@ struct ceph_msg *ceph_msg_new(int type, int front_len, gfp_t flags,
3130 INIT_LIST_HEAD(&m->data); 3130 INIT_LIST_HEAD(&m->data);
3131 3131
3132 /* front */ 3132 /* front */
3133 m->front_max = front_len; 3133 m->front_alloc_len = front_len;
3134 if (front_len) { 3134 if (front_len) {
3135 if (front_len > PAGE_CACHE_SIZE) { 3135 if (front_len > PAGE_CACHE_SIZE) {
3136 m->front.iov_base = __vmalloc(front_len, flags, 3136 m->front.iov_base = __vmalloc(front_len, flags,
@@ -3305,8 +3305,8 @@ EXPORT_SYMBOL(ceph_msg_last_put);
3305 3305
3306void ceph_msg_dump(struct ceph_msg *msg) 3306void ceph_msg_dump(struct ceph_msg *msg)
3307{ 3307{
3308 pr_debug("msg_dump %p (front_max %d length %zd)\n", msg, 3308 pr_debug("msg_dump %p (front_alloc_len %d length %zd)\n", msg,
3309 msg->front_max, msg->data_length); 3309 msg->front_alloc_len, msg->data_length);
3310 print_hex_dump(KERN_DEBUG, "header: ", 3310 print_hex_dump(KERN_DEBUG, "header: ",
3311 DUMP_PREFIX_OFFSET, 16, 1, 3311 DUMP_PREFIX_OFFSET, 16, 1,
3312 &msg->hdr, sizeof(msg->hdr), true); 3312 &msg->hdr, sizeof(msg->hdr), true);
diff --git a/net/ceph/mon_client.c b/net/ceph/mon_client.c
index 1fe25cd29d0e..2ac9ef35110b 100644
--- a/net/ceph/mon_client.c
+++ b/net/ceph/mon_client.c
@@ -152,7 +152,7 @@ static int __open_session(struct ceph_mon_client *monc)
152 /* initiatiate authentication handshake */ 152 /* initiatiate authentication handshake */
153 ret = ceph_auth_build_hello(monc->auth, 153 ret = ceph_auth_build_hello(monc->auth,
154 monc->m_auth->front.iov_base, 154 monc->m_auth->front.iov_base,
155 monc->m_auth->front_max); 155 monc->m_auth->front_alloc_len);
156 __send_prepared_auth_request(monc, ret); 156 __send_prepared_auth_request(monc, ret);
157 } else { 157 } else {
158 dout("open_session mon%d already open\n", monc->cur_mon); 158 dout("open_session mon%d already open\n", monc->cur_mon);
@@ -196,7 +196,7 @@ static void __send_subscribe(struct ceph_mon_client *monc)
196 int num; 196 int num;
197 197
198 p = msg->front.iov_base; 198 p = msg->front.iov_base;
199 end = p + msg->front_max; 199 end = p + msg->front_alloc_len;
200 200
201 num = 1 + !!monc->want_next_osdmap + !!monc->want_mdsmap; 201 num = 1 + !!monc->want_next_osdmap + !!monc->want_mdsmap;
202 ceph_encode_32(&p, num); 202 ceph_encode_32(&p, num);
@@ -897,7 +897,7 @@ static void handle_auth_reply(struct ceph_mon_client *monc,
897 ret = ceph_handle_auth_reply(monc->auth, msg->front.iov_base, 897 ret = ceph_handle_auth_reply(monc->auth, msg->front.iov_base,
898 msg->front.iov_len, 898 msg->front.iov_len,
899 monc->m_auth->front.iov_base, 899 monc->m_auth->front.iov_base,
900 monc->m_auth->front_max); 900 monc->m_auth->front_alloc_len);
901 if (ret < 0) { 901 if (ret < 0) {
902 monc->client->auth_err = ret; 902 monc->client->auth_err = ret;
903 wake_up_all(&monc->client->auth_wq); 903 wake_up_all(&monc->client->auth_wq);
@@ -939,7 +939,7 @@ static int __validate_auth(struct ceph_mon_client *monc)
939 return 0; 939 return 0;
940 940
941 ret = ceph_build_auth(monc->auth, monc->m_auth->front.iov_base, 941 ret = ceph_build_auth(monc->auth, monc->m_auth->front.iov_base,
942 monc->m_auth->front_max); 942 monc->m_auth->front_alloc_len);
943 if (ret <= 0) 943 if (ret <= 0)
944 return ret; /* either an error, or no need to authenticate */ 944 return ret; /* either an error, or no need to authenticate */
945 __send_prepared_auth_request(monc, ret); 945 __send_prepared_auth_request(monc, ret);