bcount and buf_len are both int, and no force convert in the caculation code:
tmp = ((bcount * buf_len / jiffies_to_msecs(end - start)) *
1000) / (1024 * 1024);
That may cause overflow in modern fast machine.
Change-Id: I1e5abccad3e4df62907317a09de02beb6d831e13
Signed-off-by: Gu Zheng <gzheng@ddn.com>
Reviewed-on: https://review.whamcloud.com/25436
Reviewed-by: Andreas Dilger <andreas.dilger@intel.com>
Reviewed-by: Emoly Liu <emoly.liu@intel.com>
Tested-by: Jenkins
Tested-by: Maloo <hpdd-maloo@intel.com>
Reviewed-by: James Simmons <uja.ornl@yahoo.com>
Reviewed-by: Li Xi <lixi@ddn.com>
int buf_len = max(PAGE_SIZE, 1048576UL);
void *buf;
unsigned long start, end;
- int bcount, err = 0;
+ int err = 0;
+ unsigned long bcount;
struct page *page;
unsigned char hash[CFS_CRYPTO_HASH_DIGESTSIZE_MAX];
unsigned int hash_len = sizeof(hash);