Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 37155
b: refs/heads/master
c: 68c3271
h: refs/heads/master
i:
  37153: 7b1653d
  37151: 3f6e74b
v: v3
  • Loading branch information
Nathan Scott authored and Tim Shimmin committed Sep 28, 2006
1 parent aa45261 commit 3dbca1c
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 2 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: d432c80e68e3c283fc9a85021f5b65e0aabf254e
refs/heads/master: 68c3271515f11f6665dc8732e53aaab3d3fdd7d3
7 changes: 7 additions & 0 deletions trunk/fs/xfs/linux-2.6/xfs_linux.h
Original file line number Diff line number Diff line change
Expand Up @@ -332,4 +332,11 @@ static inline __uint64_t roundup_64(__uint64_t x, __uint32_t y)
return(x * y);
}

static inline __uint64_t howmany_64(__uint64_t x, __uint32_t y)
{
x += y - 1;
do_div(x, y);
return x;
}

#endif /* __XFS_LINUX__ */
2 changes: 1 addition & 1 deletion trunk/fs/xfs/xfs_rtalloc.c
Original file line number Diff line number Diff line change
Expand Up @@ -1948,7 +1948,7 @@ xfs_growfs_rt(
*/
nrextents = nrblocks;
do_div(nrextents, in->extsize);
nrbmblocks = roundup_64(nrextents, NBBY * sbp->sb_blocksize);
nrbmblocks = howmany_64(nrextents, NBBY * sbp->sb_blocksize);
nrextslog = xfs_highbit32(nrextents);
nrsumlevels = nrextslog + 1;
nrsumsize = (uint)sizeof(xfs_suminfo_t) * nrsumlevels * nrbmblocks;
Expand Down

0 comments on commit 3dbca1c

Please sign in to comment.