Replaced common u64.h functions with operators.
Change-Id: I71b7b4879209eeff89ce5748d67102afebf871dc
This commit is contained in:
@@ -76,8 +76,8 @@ static u32_t fs_bufs_heuristic(int minbufs, u32_t btotal, u64_t bfree,
|
||||
vsi.vsi_pagesize / 1024;
|
||||
|
||||
/* check fs usage. */
|
||||
kbytes_used_fs = div64u(mul64u(bused, blocksize), 1024);
|
||||
kbytes_total_fs = div64u(mul64u(btotal, blocksize), 1024);
|
||||
kbytes_used_fs = (unsigned long)(((u64_t)bused * blocksize) / 1024);
|
||||
kbytes_total_fs = (unsigned long)(((u64_t)btotal * blocksize) / 1024);
|
||||
|
||||
/* heuristic for a desired cache size based on FS usage;
|
||||
* but never bigger than half of the total filesystem
|
||||
@@ -518,7 +518,7 @@ register struct buf *bp; /* buffer pointer */
|
||||
ASSERT(bp->lmfs_bytes == fs_block_size);
|
||||
ASSERT(fs_block_size > 0);
|
||||
|
||||
pos = mul64u(bp->lmfs_blocknr, fs_block_size);
|
||||
pos = (u64_t)bp->lmfs_blocknr * fs_block_size;
|
||||
if(fs_block_size > PAGE_SIZE) {
|
||||
#define MAXPAGES 20
|
||||
vir_bytes blockrem, vaddr = (vir_bytes) bp->data;
|
||||
@@ -704,7 +704,7 @@ void lmfs_rw_scattered(
|
||||
assert(nblocks > 0);
|
||||
assert(niovecs > 0);
|
||||
|
||||
pos = mul64u(bufq[0]->lmfs_blocknr, fs_block_size);
|
||||
pos = (u64_t)bufq[0]->lmfs_blocknr * fs_block_size;
|
||||
if (rw_flag == READING)
|
||||
r = bdev_gather(dev, pos, iovec, niovecs, BDEV_NOFLAGS);
|
||||
else
|
||||
|
||||
Reference in New Issue
Block a user