aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJie Liu <jeff.liu@oracle.com>2013-08-13 01:32:00 -0400
committerBen Myers <bpm@sgi.com>2013-08-13 15:19:11 -0400
commit2c2bcc0735f4ab052559b539f3fcab4087187232 (patch)
treeecc3f2774b2a1f4239e2f7d24490bc906ce61898
parent3e7b91cf8c19d89e55df5f05e3010446dbdaba77 (diff)
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: Fengguang Wu <fengguang.wu@intel.com> Cc: Dave Chinner <dchinner@redhat.com> Signed-off-by: Jie Liu <jeff.liu@oracle.com> Reviewed-by: Dave Chinner <dchinner@redhat.com> Signed-off-by: Ben Myers <bpm@sgi.com>
-rw-r--r--fs/xfs/xfs_log_rlimit.c8
1 files changed, 5 insertions, 3 deletions
diff --git a/fs/xfs/xfs_log_rlimit.c b/fs/xfs/xfs_log_rlimit.c
index 6b17ef4a061b..bbcec0bbc12d 100644
--- a/fs/xfs/xfs_log_rlimit.c
+++ b/fs/xfs/xfs_log_rlimit.c
@@ -136,10 +136,12 @@ xfs_log_calc_minimum_size(
136 * Also, the log size should be a multiple of the log stripe unit, round 136 * Also, the log size should be a multiple of the log stripe unit, round
137 * it up to lsunit boundary if lsunit is specified. 137 * it up to lsunit boundary if lsunit is specified.
138 */ 138 */
139 if (lsunit) 139 if (lsunit) {
140 min_logblks = roundup(BTOBB(max_logres), lsunit) + 2 * lsunit; 140 min_logblks = roundup_64(BTOBB(max_logres), lsunit) +
141 else 141 2 * lsunit;
142 } else
142 min_logblks = BTOBB(max_logres) + 2 * BBSIZE; 143 min_logblks = BTOBB(max_logres) + 2 * BBSIZE;
143 min_logblks *= XFS_MIN_LOG_FACTOR; 144 min_logblks *= XFS_MIN_LOG_FACTOR;
145
144 return XFS_BB_TO_FSB(mp, min_logblks); 146 return XFS_BB_TO_FSB(mp, min_logblks);
145} 147}