Whamcloud - gitweb
LU-6174 lov: use standard Linux 64 divison macros
For the case of 64 bit platforms lov_do_div64() is basically the
same as div_u64_rem(). For the 32 bit platform case lustre tries
to work around the issue of the divisor being larger than 32 bits.
We can also use div64_u64_rem() as well for 32 bit platforms since
Linux supports that as well.
With the move to Linux div64 operations we need to migrate fields
related to 64 bit size fields. To pick the correct div64 function
we need to select the proper sign value. The lov layer often uses
loff_t, which is signed, for stripe sizes which doesn't make sense
since sizes should always be positive. Creating a negative size by
mistake will give an bizarre offset into a file. Avoid any potential
issues with signed vs unsigned issues by replacing the loff_t use
in this case with u64.
Test-Parameters: testlist=large-lun env=ONLY=5,REFORMAT=yes
Change-Id: Ieadc266d43d6be1d6d47ee14ba9ac0dab01e7d86
Signed-off-by: James Simmons <jsimmons@infradead.org>
Reviewed-on: https://review.whamcloud.com/c/fs/lustre-release/+/39343
Tested-by: jenkins <devops@whamcloud.com>
Tested-by: Maloo <maloo@whamcloud.com>
Reviewed-by: Shaun Tancheff <shaun.tancheff@hpe.com>
Reviewed-by: Andreas Dilger <adilger@whamcloud.com>
Reviewed-by: Timothy Day <timday@amazon.com>
Reviewed-by: Oleg Drokin <green@whamcloud.com>