Skip to contentSkip to conversation

xfs: call roundup_64() to calculate the min_logblks

PATCH Applied Jeff Liu 4 participants 5 messages Aug 13, 2013 XFS filesystem

lore
Share & tools
lore

Jeff Liu

author
#0 lore raw

PATCH 1/1 xfs: call roundup_64() to calculate the min_logblks

From: Jie Liu <[email protected]>

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'

---
 fs/xfs/xfs_log_rlimit.c |    8 +++++---
 1 file changed, 5 insertions(+), 3 deletions(-)
fs/xfs/xfs_log_rlimit.c +5 -3
index 6b17ef4..bbcec0b 100644
@@ -136,10 +136,12 @@ xfs_log_calc_minimum_size(
 	 * Also, the log size should be a multiple of the log stripe unit, round
 	 * it up to lsunit boundary if lsunit is specified.
 	 */
-	if (lsunit)
-		min_logblks = roundup(BTOBB(max_logres), lsunit) + 2 * lsunit;
-	else
+	if (lsunit) {
+		min_logblks = roundup_64(BTOBB(max_logres), lsunit) +
+			      2 * lsunit;
+	} else
 		min_logblks = BTOBB(max_logres) + 2 * BBSIZE;
 	min_logblks *= XFS_MIN_LOG_FACTOR;
+
 	return XFS_BB_TO_FSB(mp, min_logblks);
 }
Signature · 6 lines
1.7.9.5

_______________________________________________
xfs mailing list
[email protected]
http://oss.sgi.com/mailman/listinfo/xfs
Reviewed-by on v1 1/1
#1 lore raw
Quoted 6 lines · Jeff Liu

From: Jie Liu <[email protected]>

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:

Quoted 6 lines

fs/built-in.o: In function `xfs_log_calc_minimum_size':
fs/xfs/xfs_log_rlimit.c:140: undefined reference to `__udivdi3'

You beat me to it, Jeff. I got an email from Fengguang's build farm, too. :)

Your fix looks good.

Signature · 7 lines
Dave Chinner
[email protected]

_______________________________________________
xfs mailing list
[email protected]
http://oss.sgi.com/mailman/listinfo/xfs
author
#2 lore raw
Quoted 10 lines · Dave Chinner
Quoted 9 lines · Jeff Liu

From: Jie Liu <[email protected]>

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'

Quoted 6 lines
Quoted 3 lines

You beat me to it, Jeff. I got an email from Fengguang's build farm, too. :)

Hi Dave,

I'm on a longer vacations these days(until next week). I have asked my friend for help checking our mailing list to watch if there's any email for me before the leaving, so I got his phone call this morning for this bug. :)

Quoted 4 lines

Your fix looks good.

Thanks for your quick review!

-Jeff

_______________________________________________
xfs mailing list
[email protected]
http://oss.sgi.com/mailman/listinfo/xfs

#3 lore raw
Quoted 19 lines · Jeff Liu
Quoted 10 lines · Dave Chinner
Quoted 9 lines · Jeff Liu

From: Jie Liu <[email protected]>

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'

Quoted 6 lines
Quoted 3 lines

You beat me to it, Jeff. I got an email from Fengguang's build farm, too. :)

Quoted 6 lines

Hi Dave,

I'm on a longer vacations these days(until next week). I have asked my friend for help checking our mailing list to watch if there's any email for me before the leaving, so I got his phone call this morning for this bug. :)

Now that's dedication. :)

-Eric

Quoted 5 lines
Quoted 4 lines

Your fix looks good.

Quoted 9 lines

Thanks for your quick review!

-Jeff

_______________________________________________
xfs mailing list
[email protected]
http://oss.sgi.com/mailman/listinfo/xfs

_______________________________________________
xfs mailing list
[email protected]
http://oss.sgi.com/mailman/listinfo/xfs

Applied
#4 lore raw
In reply to Jeff Liu
Quoted 6 lines · Jeff Liu

From: Jie Liu <[email protected]>

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:

Quoted 6 lines

fs/built-in.o: In function `xfs_log_calc_minimum_size':
fs/xfs/xfs_log_rlimit.c:140: undefined reference to `__udivdi3'

Applied. Thanks Jeff.

_______________________________________________
xfs mailing list
[email protected]
http://oss.sgi.com/mailman/listinfo/xfs