Skip to contentSkip to conversation

libceph: print more info for short message header

PATCH In review Alex Elder 2 participants 2 messages May 29, 2013 – May 30, 2013 Ceph common code (libceph)

lore
Share & tools
lore

Alex Elder

author
#0 lore raw

PATCH 1/1 libceph: print more info for short message header

If an osd client response message arrives that has a front section that's too big for the buffer set aside to receive it, a warning gets reported and a new buffer is allocated.

The warning says nothing about which connection had the problem. Add the peer type and number to what gets reported, to be a bit more informative.

---
 net/ceph/osd_client.c |    6 ++++--
 1 file changed, 4 insertions(+), 2 deletions(-)
net/ceph/osd_client.c +0 -0
index e0abb83..61147fe 100644
@@ -2454,8 +2454,10 @@ static struct ceph_msg *get_reply(struct

ceph_connection *con,
ceph_msg_revoke_incoming(req->r_reply);

if (front > req->r_reply->front.iov_len) {
- pr_warning("get_reply front %d > preallocated %d\n",
- front, (int)req->r_reply->front.iov_len);
+ pr_warning("get_reply front %d > preallocated %d (%u#%llu)\n",

+			   front, (int)req->r_reply->front.iov_len,
+			   (unsigned int)con->peer_name.type,
+			   le64_to_cpu(con->peer_name.num));

m = ceph_msg_new(CEPH_MSG_OSD_OPREPLY, front, GFP_NOFS, false); if (!m)
goto out;

Signature · 1 line
1.7.9.5
Reviewed-by on v1 1/1
#1 lore raw
Quoted 30 lines · Alex Elder

If an osd client response message arrives that has a front section that's too big for the buffer set aside to receive it, a warning gets reported and a new buffer is allocated.

The warning says nothing about which connection had the problem. Add the peer type and number to what gets reported, to be a bit more informative.

---
net/ceph/osd_client.c | 6 ++++--

1 file changed, 4 insertions(+), 2 deletions(-)
net/ceph/osd_client.c +4 -2
index e0abb83..61147fe 100644
@@ -2454,8 +2454,10 @@ static struct ceph_msg *get_reply(struct
 ceph_connection *con,
 	ceph_msg_revoke_incoming(req->r_reply);
 
 	if (front > req->r_reply->front.iov_len) {
-		pr_warning("get_reply front %d > preallocated %d\n",
-			   front, (int)req->r_reply->front.iov_len);
+		pr_warning("get_reply front %d > preallocated %d (%u#%llu)\n",
+			   front, (int)req->r_reply->front.iov_len,
+			   (unsigned int)con->peer_name.type,
+			   le64_to_cpu(con->peer_name.num));
 		m = ceph_msg_new(CEPH_MSG_OSD_OPREPLY, front, GFP_NOFS, false);
 		if (!m)
Quoted 1 line
			goto out;