提交 3a140a0d 编写于 作者: S Sage Weil

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: NSage Weil <sage@inktank.com>
Reviewed-by: NAlex Elder <elder@inktank.com>
Reviewed-by: NYehuda Sadeh <yehuda@inktank.com>
上级 546f04ef
......@@ -2287,14 +2287,18 @@ static void con_work(struct work_struct *work)
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);
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册