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 <dinatale2@llnl.gov>
Reviewed-by: Brian Behlendorf <behlendorf1@llnl.gov>
Signed-off-by: Chris Zubrzycki <github@mid-earth.net>
Closes #7417
This commit is contained in:
beren12 2018-04-12 13:47:32 -04:00 committed by Brian Behlendorf
parent d22f3a8244
commit 7403d0743e
1 changed files with 1 additions and 1 deletions

View File

@ -7282,7 +7282,7 @@ arc_tuning_update(void)
/* Valid range: 64M - <all physical memory> */ /* Valid range: 64M - <all physical memory> */
if ((zfs_arc_max) && (zfs_arc_max != arc_c_max) && 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)) { (zfs_arc_max > arc_c_min)) {
arc_c_max = zfs_arc_max; arc_c_max = zfs_arc_max;
arc_c = arc_c_max; arc_c = arc_c_max;