* [PATCH] xfs: call roundup_64() to calculate the min_logblks
@ 2013-08-13 5:32 Jeff Liu
2013-08-13 6:53 ` Dave Chinner
2013-08-13 20:44 ` Ben Myers
0 siblings, 2 replies; 5+ messages in thread
From: Jeff Liu @ 2013-08-13 5:32 UTC (permalink / raw)
To: xfs@oss.sgi.com; +Cc: kbuild test robot
From: Jie Liu <jeff.liu@oracle.com>
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>
---
fs/xfs/xfs_log_rlimit.c | 8 +++++---
1 file changed, 5 insertions(+), 3 deletions(-)
diff --git a/fs/xfs/xfs_log_rlimit.c b/fs/xfs/xfs_log_rlimit.c
index 6b17ef4..bbcec0b 100644
--- a/fs/xfs/xfs_log_rlimit.c
+++ b/fs/xfs/xfs_log_rlimit.c
@@ -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);
}
--
1.7.9.5
_______________________________________________
xfs mailing list
xfs@oss.sgi.com
http://oss.sgi.com/mailman/listinfo/xfs
^ permalink raw reply related [flat|nested] 5+ messages in thread
* Re: [PATCH] xfs: call roundup_64() to calculate the min_logblks
2013-08-13 5:32 [PATCH] xfs: call roundup_64() to calculate the min_logblks Jeff Liu
@ 2013-08-13 6:53 ` Dave Chinner
2013-08-13 7:51 ` Jeff Liu
2013-08-13 20:44 ` Ben Myers
1 sibling, 1 reply; 5+ messages in thread
From: Dave Chinner @ 2013-08-13 6:53 UTC (permalink / raw)
To: Jeff Liu; +Cc: kbuild test robot, xfs@oss.sgi.com
On Tue, Aug 13, 2013 at 01:32:00PM +0800, Jeff Liu wrote:
> From: Jie Liu <jeff.liu@oracle.com>
>
> 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>
You beat me to it, Jeff. I got an email from Fengguang's build farm,
too. :)
Your fix looks good.
Reviewed-by: Dave Chinner <dchinner@redhat.com>
--
Dave Chinner
david@fromorbit.com
_______________________________________________
xfs mailing list
xfs@oss.sgi.com
http://oss.sgi.com/mailman/listinfo/xfs
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [PATCH] xfs: call roundup_64() to calculate the min_logblks
2013-08-13 6:53 ` Dave Chinner
@ 2013-08-13 7:51 ` Jeff Liu
2013-08-13 15:12 ` Eric Sandeen
0 siblings, 1 reply; 5+ messages in thread
From: Jeff Liu @ 2013-08-13 7:51 UTC (permalink / raw)
To: Dave Chinner; +Cc: kbuild test robot, xfs@oss.sgi.com
On 08/13/2013 02:53 PM, Dave Chinner wrote:
> On Tue, Aug 13, 2013 at 01:32:00PM +0800, Jeff Liu wrote:
>> From: Jie Liu <jeff.liu@oracle.com>
>>
>> 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>
>
> 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. :)
>
> Your fix looks good.
>
> Reviewed-by: Dave Chinner <dchinner@redhat.com>
Thanks for your quick review!
-Jeff
_______________________________________________
xfs mailing list
xfs@oss.sgi.com
http://oss.sgi.com/mailman/listinfo/xfs
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [PATCH] xfs: call roundup_64() to calculate the min_logblks
2013-08-13 7:51 ` Jeff Liu
@ 2013-08-13 15:12 ` Eric Sandeen
0 siblings, 0 replies; 5+ messages in thread
From: Eric Sandeen @ 2013-08-13 15:12 UTC (permalink / raw)
To: Jeff Liu; +Cc: kbuild test robot, xfs@oss.sgi.com
On 8/13/13 2:51 AM, Jeff Liu wrote:
> On 08/13/2013 02:53 PM, Dave Chinner wrote:
>
>> On Tue, Aug 13, 2013 at 01:32:00PM +0800, Jeff Liu wrote:
>>> From: Jie Liu <jeff.liu@oracle.com>
>>>
>>> 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>
>>
>> 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. :)
Now that's dedication. :)
-Eric
>>
>> Your fix looks good.
>>
>> Reviewed-by: Dave Chinner <dchinner@redhat.com>
>
> Thanks for your quick review!
>
> -Jeff
>
> _______________________________________________
> xfs mailing list
> xfs@oss.sgi.com
> http://oss.sgi.com/mailman/listinfo/xfs
>
_______________________________________________
xfs mailing list
xfs@oss.sgi.com
http://oss.sgi.com/mailman/listinfo/xfs
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [PATCH] xfs: call roundup_64() to calculate the min_logblks
2013-08-13 5:32 [PATCH] xfs: call roundup_64() to calculate the min_logblks Jeff Liu
2013-08-13 6:53 ` Dave Chinner
@ 2013-08-13 20:44 ` Ben Myers
1 sibling, 0 replies; 5+ messages in thread
From: Ben Myers @ 2013-08-13 20:44 UTC (permalink / raw)
To: Jeff Liu; +Cc: kbuild test robot, xfs@oss.sgi.com
On Tue, Aug 13, 2013 at 01:32:00PM +0800, Jeff Liu wrote:
> From: Jie Liu <jeff.liu@oracle.com>
>
> 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>
Applied. Thanks Jeff.
_______________________________________________
xfs mailing list
xfs@oss.sgi.com
http://oss.sgi.com/mailman/listinfo/xfs
^ permalink raw reply [flat|nested] 5+ messages in thread
end of thread, other threads:[~2013-08-13 20:44 UTC | newest]
Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2013-08-13 5:32 [PATCH] xfs: call roundup_64() to calculate the min_logblks Jeff Liu
2013-08-13 6:53 ` Dave Chinner
2013-08-13 7:51 ` Jeff Liu
2013-08-13 15:12 ` Eric Sandeen
2013-08-13 20:44 ` Ben Myers
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox