The used value calculated for osd_inode_iteration() and
sf_items_updated_prior are both 64 bit values. The code
wrongly using do_div() which could truncate sf_items_updated_prior
to a 32 bit value. Use div64_u64() instead.
Change-Id: I3d76e399e6cf50460d98b1174de83263d9c2d3cc
Signed-off-by: James Simmons <jsimmons@infradead.org>
Reviewed-on: https://review.whamcloud.com/36750
Tested-by: jenkins <devops@whamcloud.com>
Reviewed-by: Andreas Dilger <adilger@whamcloud.com>
Tested-by: Maloo <maloo@whamcloud.com>
Reviewed-by: Wang Shilong <wshilong@ddn.com>
Reviewed-by: Shaun Tancheff <shaun.tancheff@hpe.com>
if (rc == 0) {
__u64 used = ksfs->f_files - ksfs->f_ffree;
if (rc == 0) {
__u64 used = ksfs->f_files - ksfs->f_ffree;
- do_div(used, sf->sf_items_updated_prior);
+ used = div64_u64(used, sf->sf_items_updated_prior);
/* If we hit too much inconsistent OI
* mappings during the partial scan,
* then scan the device completely. */
/* If we hit too much inconsistent OI
* mappings during the partial scan,
* then scan the device completely. */