On 05/17/2013 05:40 AM, Jeff Liu wrote:
Hi Michael,
Are you compiling kernel on 32-bit system?
Yes, this is a 32-bit Pentium 4 system.
Looks this issue is regarding 64-bit division at roundup() on 32-bit if so.
Could you please try below fix?
diff --git a/fs/xfs/xfs_log_rlimit.c b/fs/xfs/xfs_log_rlimit.c
index 3e84d46..49a88cc 100644
--- a/fs/xfs/xfs_log_rlimit.c
+++ b/fs/xfs/xfs_log_rlimit.c
@@ -127,7 +127,7 @@ xfs_log_validate_logspace(
* Also, the log size should be a multiple of the log stripe unit,
round
* it up to lsunit boundary if lsunit is specified.
*/
- minlblks = lsunit ? (roundup(BTOBB(maxlres), lsunit) + 2 * lsunit) * 2 :
+ minlblks = lsunit ? (roundup((int)BTOBB(maxlres), lsunit) + 2 * lsunit)
* 2 :
BTOBB(maxlres) * 2;
if (log->l_logBBsize < minlblks) {
Thanks,
-Jeff
This code works, and my sysadmin-hack use of "const" was not needed
after all. If you use Dave's suggestion to use roundup_64(), I'll be
happy to apply another patch.
Thanks!
Michael
|