From: Sage Weil Date: Mon, 30 Jul 2012 23:24:21 +0000 (-0700) Subject: libceph: report socket read/write error message X-Git-Url: https://git.stricted.de/?a=commitdiff_plain;h=3a140a0d5c4b9e35373b016e41dfc85f1e526bdb;p=GitHub%2Fexynos8895%2Fandroid_kernel_samsung_universal8895.git libceph: report socket read/write error message 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 192.168.106.220:6801 (null) Signed-off-by: Sage Weil Reviewed-by: Alex Elder Reviewed-by: Yehuda Sadeh --- diff --git a/net/ceph/messenger.c b/net/ceph/messenger.c index 63e1252d3af5..6e2f67816f61 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; + } done: mutex_unlock(&con->mutex);