From cca220d7c684dfd05887ae8434ad94edb2728240 Mon Sep 17 00:00:00 2001 From: beren12 Date: Thu, 12 Apr 2018 13:47:32 -0400 Subject: [PATCH] Fix zfs_arc_max minimum tuning When setting `zfs_arc_max` its minimum value is allowed to be 64 MiB. There was an off-by-1 error which can matter on tiny systems. Reviewed-by: Giuseppe Di Natale Reviewed-by: Brian Behlendorf Signed-off-by: Chris Zubrzycki Closes #7417 --- module/zfs/arc.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/module/zfs/arc.c b/module/zfs/arc.c index 236794672e..bcf74dd6ea 100644 --- a/module/zfs/arc.c +++ b/module/zfs/arc.c @@ -6358,7 +6358,7 @@ arc_tuning_update(void) /* Valid range: 64M - */ if ((zfs_arc_max) && (zfs_arc_max != arc_c_max) && - (zfs_arc_max > 64 << 20) && (zfs_arc_max < allmem) && + (zfs_arc_max >= 64 << 20) && (zfs_arc_max < allmem) && (zfs_arc_max > arc_c_min)) { arc_c_max = zfs_arc_max; arc_c = arc_c_max;