From nobody Fri Jun 26 14:59:21 2026 X-Original-To: dev-commits-src-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4gmzNB1cZcz6jd5t for ; Fri, 26 Jun 2026 14:59:22 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "YR1" (not verified)) by mx1.freebsd.org (Postfix) with ESMTPS id 4gmzN96R0vz3dY1 for ; Fri, 26 Jun 2026 14:59:21 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1782485961; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=B31sCz2X3wEx1ru8mXx+ZU3+IMbvbuuml6S28sAxyt0=; b=ILrpt/zimeUJmKRD+dzZpMFU0bsZVFslz2o3Ls77KKlRVhlGSqCmxnKL6VgOsWZmgwf0q2 SPggEjbjBdqQelTID0bFOiPfZ/MOYt7BfB0jgUemdWNKk7Bp76wHUagTT9UVYV/sK6ueBM R74XQPgNGbpSc7F+cq+izv8TZ8sRUqF57IhpHSq7JZeRYHy8XlzKV6hoO4D6yeIRckyrWn tBp2bONnOO6OpR2cp1l6dRbYZydYsKp68q1C8oB6HThfHU2/foUpAuy7haF2HpLwPWz976 GEMjFoZKDHOMTbWUrA+/gPk7I/CzmriwnCIgIYJ4Otl6HZlec0FmaktZpG/b0g== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1782485961; a=rsa-sha256; cv=none; b=Y91yMMXyrN4+DwOJhs8LM3pjpfd+W+7FCLtw8EwYybLI3onfv1T7/8M42s5p5DOzBqYxzp 9LU51C9zzATgOyAP5spOced83FWp7aA0vUPnpYbepwkmBRt7CDSC1MFRMZ4kaGWxLfXRCJ 9qllhwMG4hflNL9pTNLxznISnfYP5miBG5NuU2d8wqPEqGbd9MPKUqDaL3NnnbgLTW259i ZvAvgqwYd/LjY8antBsrhJaIHVKxdZllcHTVgFpV4MC5G4KMJNZkhT2Q86jFPNGOq66ROl aISoORmC882j7CKv06xXmoDPIamaNxM0E16Fpj4SH4PBMcDdlpk3oQxwVsdbCg== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1782485961; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=B31sCz2X3wEx1ru8mXx+ZU3+IMbvbuuml6S28sAxyt0=; b=u3nwtT72Mi8E/17yGjyI9dvNa97BvlYk1x0h9D0qYNdJ9H4kMRMMIZ/kE50yo4ZI66edZt l5UuNny8PPNQL1nEN9OXKCNplveOTtL/MXq7tnDbiLmERpJoZGCzMci9acJJ0ktHH53qgg y7iVAG0ZQzEhZ4crJxTxV8PuAAmrD4UKk4yJRy5IZS9/vsdSF6wBZ9ra2Z73qujD04Kl6n uWuvgzVuK0e3+yayyqt8s/0pgNzE5uEygHn4TrYM4FYkyDNlGnkXSK1x+qwTTnWs2ETmWY +JBiVIoa3CDEmqe3Q386oUDRqZNO1YoYSBOHNGH3ZxSFJpHuuw6EWLJqyJ6Pmw== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) by mxrelay.nyi.freebsd.org (Postfix) with ESMTP id 4gmzN956Rjzhb4 for ; Fri, 26 Jun 2026 14:59:21 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from git (uid 1279) (envelope-from git@FreeBSD.org) id 1fbf5 by gitrepo.freebsd.org (DragonFly Mail Agent v0.13+ on gitrepo.freebsd.org); Fri, 26 Jun 2026 14:59:21 +0000 To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Warner Losh Subject: git: 3e3fd1fde8e1 - main - loader.efi: Trim ZFS searching for other booting options List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-main@freebsd.org Sender: owner-dev-commits-src-main@FreeBSD.org List-Id: List-Post: List-Help: List-Subscribe: List-Unsubscribe: List-Owner: Precedence: list MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: imp X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 3e3fd1fde8e168910edc538966111c0b5f03cd5f Auto-Submitted: auto-generated Date: Fri, 26 Jun 2026 14:59:21 +0000 Message-Id: <6a3e93c9.1fbf5.1ec3ff5@gitrepo.freebsd.org> The branch main has been updated by imp: URL: https://cgit.FreeBSD.org/src/commit/?id=3e3fd1fde8e168910edc538966111c0b5f03cd5f commit 3e3fd1fde8e168910edc538966111c0b5f03cd5f Author: Warner Losh AuthorDate: 2026-06-26 14:47:25 +0000 Commit: Warner Losh CommitDate: 2026-06-26 14:54:36 +0000 loader.efi: Trim ZFS searching for other booting options When we're searching the system for all the disks in relaxed mode, we need to do a final pass over all the non-boot disks. We no longer need to have two loops since ZFS on boot device is selected properly in try_boot_device_partitions. This also simplifies the code a bit. Sponsored by: Netflix Differential Revision: https://reviews.freebsd.org/D57805 --- stand/efi/loader/main.c | 30 ++++++------------------------ 1 file changed, 6 insertions(+), 24 deletions(-) diff --git a/stand/efi/loader/main.c b/stand/efi/loader/main.c index b467740682f8..050e802181b1 100644 --- a/stand/efi/loader/main.c +++ b/stand/efi/loader/main.c @@ -681,39 +681,21 @@ find_currdev(bool do_bootmgr, char *boot_info, size_t boot_info_sz) #ifdef EFI_ZFS_BOOT /* - * Sixth Choice: Probe the boot disk for ZFS and then probe the non-boot - * disk if we have a relaxed boot poluicy. + * Sixth Choice: With a relaxed policy, try ZFS pools on non-boot + * devices after the boot device has been fully exhausted. */ - { + if (boot_policy == RELAXED) { zfsinfo_list_t *zfsinfo = efizfs_get_zfsinfo_list(); zfsinfo_t *zi; - /* - * Try ZFS pool(s) on the boot device not reachable via - * the partition walk above. - */ STAILQ_FOREACH(zi, zfsinfo, zi_link) { - if (zi->zi_handle != boot_img->DeviceHandle) + if (zi->zi_handle == boot_img->DeviceHandle) continue; - printf("Trying ZFS pool 0x%jx\n", zi->zi_pool_guid); + printf("Trying ZFS pool 0x%jx\n", + zi->zi_pool_guid); if (probe_zfs_currdev(zi->zi_pool_guid)) return (0); } - - /* - * With a relaxed policy, try pools on other devices only - * after the boot device has no bootable root. - */ - if (boot_policy == RELAXED) { - STAILQ_FOREACH(zi, zfsinfo, zi_link) { - if (zi->zi_handle == boot_img->DeviceHandle) - continue; - printf("Trying ZFS pool 0x%jx\n", - zi->zi_pool_guid); - if (probe_zfs_currdev(zi->zi_pool_guid)) - return (0); - } - } } #endif /* EFI_ZFS_BOOT */