Whamcloud - gitweb
LU-11830 lov: avoid signed vs. unsigned comparison 58/34558/2
authorAndreas Dilger <adilger@whamcloud.com>
Wed, 26 Dec 2018 09:29:55 +0000 (02:29 -0700)
committerOleg Drokin <green@whamcloud.com>
Mon, 8 Apr 2019 06:31:57 +0000 (06:31 +0000)
commitc4eed4899ac799d6f7ffd3504add9d80eca71990
tree4b34d104e642620e49d630484e21a42a72bd6e79
parentef0d195c5d3fb4a34b5c0bc014126fcf3e27c6f1
LU-11830 lov: avoid signed vs. unsigned comparison

In the expansion of do_div64() GCC complains about pointer comparison
because loff_t is not a u64 variable as it should be.  lov_do_div64()
also has signed vs. unsigned comparisons due to a signed loff_t.
Change lov_do_div() to use a 64-bit variable for do_div() instead of
loff_t to avoid these warnings.

Change OST_MAXREQSIZE and friends to be consistently unsigned values
to avoid compiler warnings.

Fix "lfs mirror resync" to avoid comparing signed and unsigned valued.

Lustre-change: https://review.whamcloud.com/33921
Lustre-commit: 632b3591b6ea21e3029299ef875179a4b5ca918f

Signed-off-by: Andreas Dilger <adilger@whamcloud.com>
Change-Id: I6df31a2c0d75e5777f471fe8cb252715dd85a5b1
Reviewed-by: Jian Yu <yujian@whamcloud.com>
Reviewed-by: Alex Zhuravlev <bzzz@whamcloud.com>
Reviewed-by: James Simmons <uja.ornl@yahoo.com>
Reviewed-on: https://review.whamcloud.com/34558
Tested-by: Jenkins
Tested-by: Maloo <maloo@whamcloud.com>
Reviewed-by: Oleg Drokin <green@whamcloud.com>
lustre/include/lustre_net.h
lustre/lov/lov_internal.h
lustre/obdclass/lprocfs_status.c
lustre/tests/mirror_io.c
lustre/utils/liblustreapi_layout.c
lustre/utils/liblustreapi_mirror.c