[PATCH 1/2] xfs: dynamic speculative EOF preallocation
Christoph Hellwig
hch at infradead.org
Tue Dec 7 04:17:46 CST 2010
I need the patch below to make the new code link on 32-bit systems:
Index: xfs/fs/xfs/xfs_mount.c
===================================================================
--- xfs.orig/fs/xfs/xfs_mount.c 2010-12-07 11:01:50.394021585 +0100
+++ xfs/fs/xfs/xfs_mount.c 2010-12-07 11:02:46.231256257 +0100
@@ -1111,7 +1111,10 @@ xfs_set_low_space_thresholds(
int i;
for (i = 0; i < XFS_LOWSP_MAX; i++) {
- mp->m_low_space[i] = mp->m_sb.sb_dblocks / 100 * (i + 1);
+ __uint64_t space = mp->m_sb.sb_dblocks;
+ do_div(space, 100);
+
+ mp->m_low_space[i] = space * (i + 1);
}
}
More information about the xfs
mailing list