From: beren12 Date: Thu, 12 Apr 2018 17:47:32 +0000 (-0400) Subject: Fix zfs_arc_max minimum tuning X-Git-Tag: zfs-0.8.0-rc1~227 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=7403d0743e2b75b7f5412a14007ba159efb67a7d;p=zfs 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 --- 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;