Whamcloud - gitweb
LU-5577 ptlrpc: fix comparison between signed and unsigned 75/12475/6
authorDmitry Eremin <dmitry.eremin@intel.com>
Wed, 29 Oct 2014 14:17:03 +0000 (17:17 +0300)
committerOleg Drokin <oleg.drokin@intel.com>
Thu, 18 Dec 2014 03:07:11 +0000 (03:07 +0000)
commit24c4f3a53b9ca5ec2c6f8c71e166f579d8838137
tree9be4dfc8bcf8033046f65b8388d062a5255e2806
parent72714911b716b9ec8eba294d852164e7a3e4b380
LU-5577 ptlrpc: fix comparison between signed and unsigned

Change return type and size argiments of lustre_msg_hdr_size(),
lustre_msg_buf{len,count}() and req_capsule_*_size() to __u32.
Change type of req_format->rf_idx and req_format->rf_fields.nr
to size_t. Also return zero for incorrect message magic instead
of -EINVAL. This will be more robust because of few of them after
LASSERTF(0, "...") and will not be returned. In the rest places
it return zero size instead of huge number after implicit
unsigned conversion.

Signed-off-by: Dmitry Eremin <dmitry.eremin@intel.com>
Change-Id: Iae8b83b4285a1ea2fa010f9de2792426c1772b2c
Reviewed-on: http://review.whamcloud.com/12475
Tested-by: Jenkins
Reviewed-by: James Simmons <uja.ornl@gmail.com>
Tested-by: Maloo <hpdd-maloo@intel.com>
Reviewed-by: Fan Yong <fan.yong@intel.com>
Reviewed-by: John L. Hammond <john.hammond@intel.com>
Reviewed-by: Oleg Drokin <oleg.drokin@intel.com>
lustre/include/lustre_net.h
lustre/include/lustre_req_layout.h
lustre/ldlm/ldlm_request.c
lustre/ptlrpc/layout.c
lustre/ptlrpc/pack_generic.c
lustre/utils/req-layout.c