提交 68c32715 编写于 作者: N Nathan Scott 提交者: Tim Shimmin

[XFS] Fix a porting botch on the realtime subvol growfs code path.

SGI-PV: 955515
SGI-Modid: xfs-linux-melb:xfs-kern:26806a
Signed-off-by: NNathan Scott <nathans@sgi.com>
Signed-off-by: NTim Shimmin <tes@sgi.com>
上级 d432c80e
...@@ -332,4 +332,11 @@ static inline __uint64_t roundup_64(__uint64_t x, __uint32_t y) ...@@ -332,4 +332,11 @@ static inline __uint64_t roundup_64(__uint64_t x, __uint32_t y)
return(x * 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__ */ #endif /* __XFS_LINUX__ */
...@@ -1948,7 +1948,7 @@ xfs_growfs_rt( ...@@ -1948,7 +1948,7 @@ xfs_growfs_rt(
*/ */
nrextents = nrblocks; nrextents = nrblocks;
do_div(nrextents, in->extsize); 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); nrextslog = xfs_highbit32(nrextents);
nrsumlevels = nrextslog + 1; nrsumlevels = nrextslog + 1;
nrsumsize = (uint)sizeof(xfs_suminfo_t) * nrsumlevels * nrbmblocks; nrsumsize = (uint)sizeof(xfs_suminfo_t) * nrsumlevels * nrbmblocks;
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册