xfs
[Top] [All Lists]

Re: [PATCH] xfs: fix 32bit __divdi3 undefined

To: Mark Tinguely <tinguely@xxxxxxx>, XFS Filesystem <xfs@xxxxxxxxxxx>
Subject: Re: [PATCH] xfs: fix 32bit __divdi3 undefined
From: Eric Sandeen <sandeen@xxxxxxxxxxx>
Date: Wed, 16 Apr 2014 16:57:21 -0500
Cc: Paul Gortmaker <paul.gortmaker@xxxxxxxxxxxxx>
Delivered-to: xfs@xxxxxxxxxxx
In-reply-to: <20140416215223.512644029@xxxxxxx>
References: <534EAB41.60901@xxxxxxxxxxxxx> <20140416215223.512644029@xxxxxxx>
User-agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.9; rv:24.0) Gecko/20100101 Thunderbird/24.4.0
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@xxxxxxxxxxxxx>
> Tested-by: Paul Gortmaker <paul.gortmaker@xxxxxxxxxxxxx>
> Signed-off-by: Mark Tinguely <tinguely@xxxxxxx>

Reviewed-by: Eric Sandeen <sandeen@xxxxxxxxxx>

> ---
>  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@xxxxxxxxxxx
> http://oss.sgi.com/mailman/listinfo/xfs
> 

<Prev in Thread] Current Thread [Next in Thread>