fsx: fix range overlap check
authorDarrick J. Wong <darrick.wong@oracle.com>
Tue, 24 Dec 2019 04:41:06 +0000 (20:41 -0800)
committerEryu Guan <guaneryu@gmail.com>
Mon, 6 Jan 2020 09:52:57 +0000 (17:52 +0800)
commitc4802d4a53a9b1f594545fe98232290e99985d5e
treea1b8cdb82282a8015f6a51dbabff9a5dd69254a7
parent64954c0ead685841eda7773639ea9bed008b3e80
fsx: fix range overlap check

On 32-bit systems, the offsets are 'unsigned long' (32-bit) which means
that we must cast the explicitly to unsigned long long before feeding
them to llabs.  Without the type conversion we fail to sign-extend the
llabs parameter, try to make a copy/clone/dedupe call with overlapping
ranges, and fsx aborts and the test fails.

Signed-off-by: Darrick J. Wong <darrick.wong@oracle.com>
Reviewed-by: Eryu Guan <guaneryu@gmail.com>
Signed-off-by: Eryu Guan <guaneryu@gmail.com>
ltp/fsx.c