aboutsummaryrefslogtreecommitdiffstats
path: root/module/zfs/arc.c
diff options
context:
space:
mode:
authorMatthew Macy <[email protected]>2020-07-31 21:30:31 -0700
committerGitHub <[email protected]>2020-07-31 21:30:31 -0700
commit47ed79ff60945e0c5d8ccb56f0d29a893e1261ac (patch)
treeaf032038ad66d947e333ea55cf1383ce2627ea8b /module/zfs/arc.c
parent0cc3454821879396c38d8c557ab918a70afd919b (diff)
Changes to make openzfs build within FreeBSD buildworld
A collection of header changes to enable FreeBSD to build with vendored OpenZFS. Reviewed-by: Ryan Moeller <[email protected]> Reviewed-by: Brian Behlendorf <[email protected]> Signed-off-by: Matt Macy <[email protected]> Closes #10635
Diffstat (limited to 'module/zfs/arc.c')
-rw-r--r--module/zfs/arc.c6
1 files changed, 6 insertions, 0 deletions
diff --git a/module/zfs/arc.c b/module/zfs/arc.c
index 3ec98917d..9399f9721 100644
--- a/module/zfs/arc.c
+++ b/module/zfs/arc.c
@@ -7447,9 +7447,15 @@ arc_init(void)
* zfs_dirty_data_max_percent (default 10%) with a cap at
* zfs_dirty_data_max_max (default 4G or 25% of physical memory).
*/
+#ifdef __LP64__
if (zfs_dirty_data_max_max == 0)
zfs_dirty_data_max_max = MIN(4ULL * 1024 * 1024 * 1024,
allmem * zfs_dirty_data_max_max_percent / 100);
+#else
+ if (zfs_dirty_data_max_max == 0)
+ zfs_dirty_data_max_max = MIN(1ULL * 1024 * 1024 * 1024,
+ allmem * zfs_dirty_data_max_max_percent / 100);
+#endif
if (zfs_dirty_data_max == 0) {
zfs_dirty_data_max = allmem *