Commit 2c2bcc07 authored by Jie Liu's avatar Jie Liu Committed by Ben Myers

xfs: call roundup_64() to calculate the min_logblks

Replace roundup() with roundup_64() as we calculate min_logblks
with 64-bit divisions.  Hence, call roundup() will cause the
following error while compiling a 32-bit kernel:

fs/built-in.o: In function `xfs_log_calc_minimum_size':
fs/xfs/xfs_log_rlimit.c:140: undefined reference to `__udivdi3'
Reported-by: default avatarFengguang Wu <fengguang.wu@intel.com>
Cc: Dave Chinner <dchinner@redhat.com>
Signed-off-by: default avatarJie Liu <jeff.liu@oracle.com>
Reviewed-by: default avatarDave Chinner <dchinner@redhat.com>
Signed-off-by: default avatarBen Myers <bpm@sgi.com>
parent 3e7b91cf
...@@ -136,10 +136,12 @@ xfs_log_calc_minimum_size( ...@@ -136,10 +136,12 @@ xfs_log_calc_minimum_size(
* Also, the log size should be a multiple of the log stripe unit, round * Also, the log size should be a multiple of the log stripe unit, round
* it up to lsunit boundary if lsunit is specified. * it up to lsunit boundary if lsunit is specified.
*/ */
if (lsunit) if (lsunit) {
min_logblks = roundup(BTOBB(max_logres), lsunit) + 2 * lsunit; min_logblks = roundup_64(BTOBB(max_logres), lsunit) +
else 2 * lsunit;
} else
min_logblks = BTOBB(max_logres) + 2 * BBSIZE; min_logblks = BTOBB(max_logres) + 2 * BBSIZE;
min_logblks *= XFS_MIN_LOG_FACTOR; min_logblks *= XFS_MIN_LOG_FACTOR;
return XFS_BB_TO_FSB(mp, min_logblks); return XFS_BB_TO_FSB(mp, min_logblks);
} }
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment