linux-xfs.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Eric Sandeen <sandeen@sandeen.net>
To: Mark Tinguely <tinguely@sgi.com>, XFS Filesystem <xfs@oss.sgi.com>
Cc: Paul Gortmaker <paul.gortmaker@windriver.com>
Subject: Re: [PATCH] xfs: fix 32bit __divdi3 undefined
Date: Wed, 16 Apr 2014 16:57:21 -0500	[thread overview]
Message-ID: <534EFCC1.1080008@sandeen.net> (raw)
In-Reply-To: <20140416215223.512644029@sgi.com>

On 4/16/14, 4:51 PM, Mark Tinguely wrote:
> The roundup in commit 68c1fb5d should be a roundup_64()
> because it is desired to round a 64 bit type by an integer
> and that will result in a 64 bit value. On 32 bit machines
> using roundup() in this case will result in the error:
> 
>  ERROR: "__divdi3" [fs/xfs/xfs.ko] undefined!
> 
> Reported-by: Paul Gortmaker <paul.gortmaker@windriver.com>
> Tested-by: Paul Gortmaker <paul.gortmaker@windriver.com>
> Signed-off-by: Mark Tinguely <tinguely@sgi.com>

Reviewed-by: Eric Sandeen <sandeen@redhat.com>

> ---
>  fs/xfs/xfs_aops.c |    2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> Index: b/fs/xfs/xfs_aops.c
> ===================================================================
> --- a/fs/xfs/xfs_aops.c
> +++ b/fs/xfs/xfs_aops.c
> @@ -1365,7 +1365,7 @@ __xfs_get_blocks(
>  		if (offset < i_size_read(inode) &&
>  		    offset + mapping_size >= i_size_read(inode)) {
>  			/* limit mapping to block that spans EOF */
> -			mapping_size = roundup(i_size_read(inode) - offset,
> +			mapping_size = roundup_64(i_size_read(inode) - offset,
>  					       1 << inode->i_blkbits);
>  		}
>  		if (mapping_size > LONG_MAX)
> 
> 
> _______________________________________________
> 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

  reply	other threads:[~2014-04-16 21:57 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-04-16 16:09 new 64 bit math link fail in xfs in linux-next today Paul Gortmaker
2014-04-16 20:59 ` Mark Tinguely
2014-04-16 21:45   ` Paul Gortmaker
2014-04-16 21:51 ` [PATCH] xfs: fix 32bit __divdi3 undefined Mark Tinguely
2014-04-16 21:57   ` Eric Sandeen [this message]
2014-04-16 22:10   ` Dave Chinner
2014-04-16 22:30     ` Mark Tinguely
2014-04-16 21:57 ` new 64 bit math link fail in xfs in linux-next today Dave Chinner

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=534EFCC1.1080008@sandeen.net \
    --to=sandeen@sandeen.net \
    --cc=paul.gortmaker@windriver.com \
    --cc=tinguely@sgi.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;
as well as URLs for NNTP newsgroup(s).