Skip to content

Commit 3cea4c3

Browse files
committed
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>
1 parent f48db1e commit 3cea4c3

3 files changed

Lines changed: 8 additions & 8 deletions

File tree

‎include/linux/ceph/messenger.h‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -157,7 +157,7 @@ struct ceph_msg {
157157
bool front_is_vmalloc;
158158
bool more_to_follow;
159159
bool needs_out_seq;
160-
int front_max;
160+
int front_alloc_len;
161161
unsigned long ack_stamp; /* tx: when we were acked */
162162

163163
struct ceph_msgpool *pool;

‎net/ceph/messenger.c‎

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -3130,7 +3130,7 @@ struct ceph_msg *ceph_msg_new(int type, int front_len, gfp_t flags,
31303130
INIT_LIST_HEAD(&m->data);
31313131

31323132
/* front */
3133-
m->front_max = front_len;
3133+
m->front_alloc_len = front_len;
31343134
if (front_len) {
31353135
if (front_len > PAGE_CACHE_SIZE) {
31363136
m->front.iov_base = __vmalloc(front_len, flags,
@@ -3305,8 +3305,8 @@ EXPORT_SYMBOL(ceph_msg_last_put);
33053305

33063306
void ceph_msg_dump(struct ceph_msg *msg)
33073307
{
3308-
pr_debug("msg_dump %p (front_max %d length %zd)\n", msg,
3309-
msg->front_max, msg->data_length);
3308+
pr_debug("msg_dump %p (front_alloc_len %d length %zd)\n", msg,
3309+
msg->front_alloc_len, msg->data_length);
33103310
print_hex_dump(KERN_DEBUG, "header: ",
33113311
DUMP_PREFIX_OFFSET, 16, 1,
33123312
&msg->hdr, sizeof(msg->hdr), true);

‎net/ceph/mon_client.c‎

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -152,7 +152,7 @@ static int __open_session(struct ceph_mon_client *monc)
152152
/* initiatiate authentication handshake */
153153
ret = ceph_auth_build_hello(monc->auth,
154154
monc->m_auth->front.iov_base,
155-
monc->m_auth->front_max);
155+
monc->m_auth->front_alloc_len);
156156
__send_prepared_auth_request(monc, ret);
157157
} else {
158158
dout("open_session mon%d already open\n", monc->cur_mon);
@@ -196,7 +196,7 @@ static void __send_subscribe(struct ceph_mon_client *monc)
196196
int num;
197197

198198
p = msg->front.iov_base;
199-
end = p + msg->front_max;
199+
end = p + msg->front_alloc_len;
200200

201201
num = 1 + !!monc->want_next_osdmap + !!monc->want_mdsmap;
202202
ceph_encode_32(&p, num);
@@ -897,7 +897,7 @@ static void handle_auth_reply(struct ceph_mon_client *monc,
897897
ret = ceph_handle_auth_reply(monc->auth, msg->front.iov_base,
898898
msg->front.iov_len,
899899
monc->m_auth->front.iov_base,
900-
monc->m_auth->front_max);
900+
monc->m_auth->front_alloc_len);
901901
if (ret < 0) {
902902
monc->client->auth_err = ret;
903903
wake_up_all(&monc->client->auth_wq);
@@ -939,7 +939,7 @@ static int __validate_auth(struct ceph_mon_client *monc)
939939
return 0;
940940

941941
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);
943943
if (ret <= 0)
944944
return ret; /* either an error, or no need to authenticate */
945945
__send_prepared_auth_request(monc, ret);

0 commit comments

Comments
 (0)