From 7403d0743e2b75b7f5412a14007ba159efb67a7d Mon Sep 17 00:00:00 2001 From: beren12 Date: Thu, 12 Apr 2018 13:47:32 -0400 Subject: 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(-) (limited to 'module/zfs/arc.c') diff --git a/module/zfs/arc.c b/module/zfs/arc.c index 40a93107d..d73d6ffcc 100644 --- a/module/zfs/arc.c +++ b/module/zfs/arc.c @@ -7282,7 +7282,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; -- cgit v1.2.3