Message ID | 1342831308-18815-4-git-send-email-sage@inktank.com (mailing list archive) |
---|---|
State | New, archived |
Headers | show |
Reviewed-by: Yehuda Sadeh <yehuda@inktank.com> On Fri, Jul 20, 2012 at 5:41 PM, Sage Weil <sage@inktank.com> wrote: > 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 <sage@inktank.com> > --- > net/ceph/messenger.c | 8 ++++++-- > 1 files changed, 6 insertions(+), 2 deletions(-) > > diff --git a/net/ceph/messenger.c b/net/ceph/messenger.c > index 12419a0..7105908 100644 > --- a/net/ceph/messenger.c > +++ b/net/ceph/messenger.c > @@ -2291,14 +2291,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); > -- > 1.7.9 > > -- > To unsubscribe from this list: send the line "unsubscribe ceph-devel" in > the body of a message to majordomo@vger.kernel.org > More majordomo info at http://vger.kernel.org/majordomo-info.html -- To unsubscribe from this list: send the line "unsubscribe ceph-devel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
On 07/20/2012 07:41 PM, Sage Weil wrote: > 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 <sage@inktank.com> Looks good. Reviewed-by: Alex Elder <elder@inktank.com> > --- > net/ceph/messenger.c | 8 ++++++-- > 1 files changed, 6 insertions(+), 2 deletions(-) > > diff --git a/net/ceph/messenger.c b/net/ceph/messenger.c > index 12419a0..7105908 100644 > --- a/net/ceph/messenger.c > +++ b/net/ceph/messenger.c > @@ -2291,14 +2291,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); > -- To unsubscribe from this list: send the line "unsubscribe ceph-devel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
diff --git a/net/ceph/messenger.c b/net/ceph/messenger.c index 12419a0..7105908 100644 --- a/net/ceph/messenger.c +++ b/net/ceph/messenger.c @@ -2291,14 +2291,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);
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 <sage@inktank.com> --- net/ceph/messenger.c | 8 ++++++-- 1 files changed, 6 insertions(+), 2 deletions(-)