]> git.proxmox.com Git - mirror_zfs.git/commitdiff
Fix zfs_arc_max minimum tuning
authorberen12 <github@mid-earth.net>
Thu, 12 Apr 2018 17:47:32 +0000 (13:47 -0400)
committerTony Hutter <hutter2@llnl.gov>
Tue, 8 May 2018 00:19:57 +0000 (17:19 -0700)
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

module/zfs/arc.c

index 236794672e2e5673ee96b797e6631869f59cb5fa..bcf74dd6ea45fc82f78175e268cfb80cc2077ab7 100644 (file)
@@ -6358,7 +6358,7 @@ arc_tuning_update(void)
 
        /* Valid range: 64M - <all physical memory> */
        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;