Re: [PATCH 06/33] libceph: fixup error handling in osdmap_decode()

2014-03-28 Thread Ilya Dryomov
On Thu, Mar 27, 2014 at 9:25 PM, Alex Elder el...@ieee.org wrote: On 03/27/2014 01:17 PM, Ilya Dryomov wrote: The existing error handling scheme requires resetting err to -EINVAL prior to calling any ceph_decode_* macro. This is ugly and fragile, and there already are a few places where we

[PATCH 06/33] libceph: fixup error handling in osdmap_decode()

2014-03-27 Thread Ilya Dryomov
The existing error handling scheme requires resetting err to -EINVAL prior to calling any ceph_decode_* macro. This is ugly and fragile, and there already are a few places where we would return 0 on error, due to a missing reset. Fix this by adding a special e_inval label to be used by all

Re: [PATCH 06/33] libceph: fixup error handling in osdmap_decode()

2014-03-27 Thread Alex Elder
On 03/27/2014 01:17 PM, Ilya Dryomov wrote: The existing error handling scheme requires resetting err to -EINVAL prior to calling any ceph_decode_* macro. This is ugly and fragile, and there already are a few places where we would return 0 on error, due to a missing reset. Fix this by adding