Browse Source

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>
Ilya Dryomov 11 years ago
parent
commit
3cea4c3071
3 changed files with 8 additions and 8 deletions
  1. 1 1
      include/linux/ceph/messenger.h
  2. 3 3
      net/ceph/messenger.c
  3. 4 4
      net/ceph/mon_client.c

+ 1 - 1
include/linux/ceph/messenger.h

@@ -157,7 +157,7 @@ struct ceph_msg {
 	bool front_is_vmalloc;
 	bool front_is_vmalloc;
 	bool more_to_follow;
 	bool more_to_follow;
 	bool needs_out_seq;
 	bool needs_out_seq;
-	int front_max;
+	int front_alloc_len;
 	unsigned long ack_stamp;        /* tx: when we were acked */
 	unsigned long ack_stamp;        /* tx: when we were acked */
 
 
 	struct ceph_msgpool *pool;
 	struct ceph_msgpool *pool;

+ 3 - 3
net/ceph/messenger.c

@@ -3130,7 +3130,7 @@ struct ceph_msg *ceph_msg_new(int type, int front_len, gfp_t flags,
 	INIT_LIST_HEAD(&m->data);
 	INIT_LIST_HEAD(&m->data);
 
 
 	/* front */
 	/* front */
-	m->front_max = front_len;
+	m->front_alloc_len = front_len;
 	if (front_len) {
 	if (front_len) {
 		if (front_len > PAGE_CACHE_SIZE) {
 		if (front_len > PAGE_CACHE_SIZE) {
 			m->front.iov_base = __vmalloc(front_len, flags,
 			m->front.iov_base = __vmalloc(front_len, flags,
@@ -3305,8 +3305,8 @@ EXPORT_SYMBOL(ceph_msg_last_put);
 
 
 void ceph_msg_dump(struct ceph_msg *msg)
 void ceph_msg_dump(struct ceph_msg *msg)
 {
 {
-	pr_debug("msg_dump %p (front_max %d length %zd)\n", msg,
-		 msg->front_max, msg->data_length);
+	pr_debug("msg_dump %p (front_alloc_len %d length %zd)\n", msg,
+		 msg->front_alloc_len, msg->data_length);
 	print_hex_dump(KERN_DEBUG, "header: ",
 	print_hex_dump(KERN_DEBUG, "header: ",
 		       DUMP_PREFIX_OFFSET, 16, 1,
 		       DUMP_PREFIX_OFFSET, 16, 1,
 		       &msg->hdr, sizeof(msg->hdr), true);
 		       &msg->hdr, sizeof(msg->hdr), true);

+ 4 - 4
net/ceph/mon_client.c

@@ -152,7 +152,7 @@ static int __open_session(struct ceph_mon_client *monc)
 		/* initiatiate authentication handshake */
 		/* initiatiate authentication handshake */
 		ret = ceph_auth_build_hello(monc->auth,
 		ret = ceph_auth_build_hello(monc->auth,
 					    monc->m_auth->front.iov_base,
 					    monc->m_auth->front.iov_base,
-					    monc->m_auth->front_max);
+					    monc->m_auth->front_alloc_len);
 		__send_prepared_auth_request(monc, ret);
 		__send_prepared_auth_request(monc, ret);
 	} else {
 	} else {
 		dout("open_session mon%d already open\n", monc->cur_mon);
 		dout("open_session mon%d already open\n", monc->cur_mon);
@@ -196,7 +196,7 @@ static void __send_subscribe(struct ceph_mon_client *monc)
 		int num;
 		int num;
 
 
 		p = msg->front.iov_base;
 		p = msg->front.iov_base;
-		end = p + msg->front_max;
+		end = p + msg->front_alloc_len;
 
 
 		num = 1 + !!monc->want_next_osdmap + !!monc->want_mdsmap;
 		num = 1 + !!monc->want_next_osdmap + !!monc->want_mdsmap;
 		ceph_encode_32(&p, num);
 		ceph_encode_32(&p, num);
@@ -897,7 +897,7 @@ static void handle_auth_reply(struct ceph_mon_client *monc,
 	ret = ceph_handle_auth_reply(monc->auth, msg->front.iov_base,
 	ret = ceph_handle_auth_reply(monc->auth, msg->front.iov_base,
 				     msg->front.iov_len,
 				     msg->front.iov_len,
 				     monc->m_auth->front.iov_base,
 				     monc->m_auth->front.iov_base,
-				     monc->m_auth->front_max);
+				     monc->m_auth->front_alloc_len);
 	if (ret < 0) {
 	if (ret < 0) {
 		monc->client->auth_err = ret;
 		monc->client->auth_err = ret;
 		wake_up_all(&monc->client->auth_wq);
 		wake_up_all(&monc->client->auth_wq);
@@ -939,7 +939,7 @@ static int __validate_auth(struct ceph_mon_client *monc)
 		return 0;
 		return 0;
 
 
 	ret = ceph_build_auth(monc->auth, monc->m_auth->front.iov_base,
 	ret = ceph_build_auth(monc->auth, monc->m_auth->front.iov_base,
-			      monc->m_auth->front_max);
+			      monc->m_auth->front_alloc_len);
 	if (ret <= 0)
 	if (ret <= 0)
 		return ret; /* either an error, or no need to authenticate */
 		return ret; /* either an error, or no need to authenticate */
 	__send_prepared_auth_request(monc, ret);
 	__send_prepared_auth_request(monc, ret);