git: 4c053c17f2c8 - main - zfs: Update use of UMA-related symbols in arc_available_memory

From: Bojan Novković <bnovkov_at_FreeBSD.org>
Date: Mon, 27 May 2024 13:47:42 UTC
The branch main has been updated by bnovkov:

URL: https://cgit.FreeBSD.org/src/commit/?id=4c053c17f2c8a715988f215d16284879857ca376

commit 4c053c17f2c8a715988f215d16284879857ca376
Author:     Bojan Novković <bnovkov@FreeBSD.org>
AuthorDate: 2024-05-27 13:28:03 +0000
Commit:     Bojan Novković <bnovkov@FreeBSD.org>
CommitDate: 2024-05-27 13:47:17 +0000

    zfs: Update use of UMA-related symbols in arc_available_memory
    
    da76d34 repurposed the use of UMA_MD_SMALL_ALLOC in a way that breaks
    arc_available_memory on -CURRENT. This change ensures that
    arc_available_memory uses the new symbol while maintaining compatibility
    with older FreeBSD releases. This change was submitted to upstream
    as well.
    
    Approved by:    markj (mentor)
    Fixes:  da76d34
---
 sys/contrib/openzfs/module/os/freebsd/zfs/arc_os.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/sys/contrib/openzfs/module/os/freebsd/zfs/arc_os.c b/sys/contrib/openzfs/module/os/freebsd/zfs/arc_os.c
index 92696c0bf1ae..478b74828c65 100644
--- a/sys/contrib/openzfs/module/os/freebsd/zfs/arc_os.c
+++ b/sys/contrib/openzfs/module/os/freebsd/zfs/arc_os.c
@@ -89,7 +89,7 @@ arc_available_memory(void)
 	if (n < lowest) {
 		lowest = n;
 	}
-#if defined(__i386) || !defined(UMA_MD_SMALL_ALLOC)
+#if !defined(UMA_MD_SMALL_ALLOC) && !defined(UMA_USE_DMAP)
 	/*
 	 * If we're on an i386 platform, it's possible that we'll exhaust the
 	 * kernel heap space before we ever run out of available physical