[ 3.5.yuz extended stable ] Patch "libceph: report socket read/write error message" has been added to staging queue

Herton Ronaldo Krzesinski herton.krzesinski at canonical.com
Tue Nov 20 17:18:01 UTC 2012

This is a note to let you know that I have just added a patch titled

    libceph: report socket read/write error message

to the linux-3.5.y-queue branch of the 3.5.yuz extended stable tree 
which can be found at:


If you, or anyone else, feels it should not be added to this tree, please 
reply to this email.

For more information about the 3.5.yuz tree, see



>From 49b4752a46f1a99a9e7e05e676acb24a70c223a0 Mon Sep 17 00:00:00 2001
From: Sage Weil <sage at inktank.com>
Date: Mon, 30 Jul 2012 16:24:21 -0700
Subject: [PATCH 48/78] libceph: report socket read/write error message

commit 3a140a0d5c4b9e35373b016e41dfc85f1e526bdb upstream.

We need to set error_msg to something useful before calling ceph_fault();
do so here for try_{read,write}().  This is more informative than

libceph: osd0 (null)

Signed-off-by: Sage Weil <sage at inktank.com>
Reviewed-by: Alex Elder <elder at inktank.com>
Reviewed-by: Yehuda Sadeh <yehuda at inktank.com>
Signed-off-by: Herton Ronaldo Krzesinski <herton.krzesinski at canonical.com>
 net/ceph/messenger.c |    8 ++++++--
 1 file changed, 6 insertions(+), 2 deletions(-)

diff --git a/net/ceph/messenger.c b/net/ceph/messenger.c
index 63e1252..6e2f678 100644
--- a/net/ceph/messenger.c
+++ b/net/ceph/messenger.c
@@ -2287,14 +2287,18 @@ restart:
 	ret = try_read(con);
 	if (ret == -EAGAIN)
 		goto restart;
-	if (ret < 0)
+	if (ret < 0) {
+		con->error_msg = "socket error on read";
 		goto fault;
+	}

 	ret = try_write(con);
 	if (ret == -EAGAIN)
 		goto restart;
-	if (ret < 0)
+	if (ret < 0) {
+		con->error_msg = "socket error on write";
 		goto fault;
+	}


More information about the kernel-team mailing list