public inbox for linux-xfs@vger.kernel.org
 help / color / mirror / Atom feed
* [PATCH] fix 32bit build
@ 2007-06-09 10:26 Christoph Hellwig
  2007-06-12  1:45 ` David Chinner
  0 siblings, 1 reply; 2+ messages in thread
From: Christoph Hellwig @ 2007-06-09 10:26 UTC (permalink / raw)
  To: xfs


Signed-off-by: Christoph Hellwig <hch@lst.de>

Index: linux-2.6-xfs/fs/xfs/xfs_mount.c
===================================================================
--- linux-2.6-xfs.orig/fs/xfs/xfs_mount.c	2007-06-09 11:20:51.000000000 +0200
+++ linux-2.6-xfs/fs/xfs/xfs_mount.c	2007-06-09 11:21:43.000000000 +0200
@@ -1154,7 +1154,9 @@ xfs_mountfs(
 	 * This may drive us straight to ENOSPC on mount, but that implies
 	 * we were already there on the last unmount.
 	 */
-	resblks = min_t(__uint64_t, mp->m_sb.sb_dblocks / 20, 1024);
+	resblks = mp->m_sb.sb_dblocks;
+	do_div(resblks, 20);
+	resblks = min_t(__uint64_t, resblks, 1024);
 	xfs_reserve_blocks(mp, &resblks, NULL);
 
 	return 0;

^ permalink raw reply	[flat|nested] 2+ messages in thread

* Re: [PATCH] fix 32bit build
  2007-06-09 10:26 [PATCH] fix 32bit build Christoph Hellwig
@ 2007-06-12  1:45 ` David Chinner
  0 siblings, 0 replies; 2+ messages in thread
From: David Chinner @ 2007-06-12  1:45 UTC (permalink / raw)
  To: Christoph Hellwig; +Cc: xfs

On Sat, Jun 09, 2007 at 12:26:37PM +0200, Christoph Hellwig wrote:
> 
> Signed-off-by: Christoph Hellwig <hch@lst.de>
> 
> Index: linux-2.6-xfs/fs/xfs/xfs_mount.c
> ===================================================================
> --- linux-2.6-xfs.orig/fs/xfs/xfs_mount.c	2007-06-09 11:20:51.000000000 +0200
> +++ linux-2.6-xfs/fs/xfs/xfs_mount.c	2007-06-09 11:21:43.000000000 +0200
> @@ -1154,7 +1154,9 @@ xfs_mountfs(
>  	 * This may drive us straight to ENOSPC on mount, but that implies
>  	 * we were already there on the last unmount.
>  	 */
> -	resblks = min_t(__uint64_t, mp->m_sb.sb_dblocks / 20, 1024);
> +	resblks = mp->m_sb.sb_dblocks;
> +	do_div(resblks, 20);
> +	resblks = min_t(__uint64_t, resblks, 1024);
>  	xfs_reserve_blocks(mp, &resblks, NULL);
>  
>  	return 0;
> 

/me smacks forehead.

I'll get this sorted. Thanks, Christoph.

Cheers,

Dave.
-- 
Dave Chinner
Principal Engineer
SGI Australian Software Group

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2007-06-12  1:46 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2007-06-09 10:26 [PATCH] fix 32bit build Christoph Hellwig
2007-06-12  1:45 ` David Chinner

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox