From: "Michael L. Semon" <mlsemon35@gmail.com>
To: Jeff Liu <jeff.liu@oracle.com>
Cc: "xfs@oss.sgi.com" <xfs@oss.sgi.com>
Subject: Re: [PATCH v2 7/8] xfs: Add xfs_log_rlimit.[c|h]
Date: Fri, 17 May 2013 15:31:03 -0400 [thread overview]
Message-ID: <51968577.2070603@gmail.com> (raw)
In-Reply-To: <5195FB1B.9000803@oracle.com>
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
_______________________________________________
xfs mailing list
xfs@oss.sgi.com
http://oss.sgi.com/mailman/listinfo/xfs
prev parent reply other threads:[~2013-05-17 19:31 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-05-17 5:39 [PATCH v2 7/8] xfs: Add xfs_log_rlimit.[c|h] Jeff Liu
2013-05-17 7:51 ` Michael L. Semon
2013-05-17 8:36 ` Michael L. Semon
2013-05-17 9:40 ` Jeff Liu
2013-05-17 10:29 ` Dave Chinner
2013-05-17 10:34 ` Jeff Liu
2013-05-17 19:31 ` Michael L. Semon [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=51968577.2070603@gmail.com \
--to=mlsemon35@gmail.com \
--cc=jeff.liu@oracle.com \
--cc=xfs@oss.sgi.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox