Skip to contentSkip to conversation

fix 32bit build

PATCH In review Christoph Hellwig 2 participants 2 messages Jun 9, 2007 – Jun 12, 2007 XFS filesystem

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 fix 32bit build

fs/xfs/xfs_mount.c +3 -1
Index: linux-2.6-xfs/fs/xfs/xfs_mount.c
===================================================================
@@ -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;
#1 lore raw
Quoted 9 lines · Christoph Hellwig

Index: linux-2.6-xfs/fs/xfs/xfs_mount.c
===================================================================

fs/xfs/xfs_mount.c xfs_mountfs( · line 1162

Quoted 10 lines
fs/xfs/xfs_mount.c +3 -1
@@ -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.

Signature · 3 lines
Dave Chinner
Principal Engineer
SGI Australian Software Group