From nobody Fri Mar 20 14:44:51 2026 X-Original-To: dev-commits-src-all@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 4fclhm6QvMz6W56Q for ; Fri, 20 Mar 2026 14:44:56 +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 "R12" (not verified)) by mx1.freebsd.org (Postfix) with ESMTPS id 4fclhm52WNz44yw for ; Fri, 20 Mar 2026 14:44:56 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1774017896; 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=qvV7cRrXm+Y08LswHtEileelHemBEZv17R/pJPLCDlw=; b=DibXD0c4nTO2+aEEjYPcUTHngi+lW6RmjG/Re0qOtzwosEj0ddTJLFjkR8d2GWHR3GADpt dc7kMrcsT6Ak3V7iAHOEGRjbx2GHhXFQA5tyRbNFrSZ0Ah5xehp0JktoOqF6/cbqJPqRyA HCiYvl3skoR1wBN5cnS4EXhknIb1NOGFkuJUp6oXYW+4bdCx2vdo6Xmv6ZTeG8QrGYmuFh zsrtIhrkH8etzagrFnt/o7yfDjiBqjrM8aZEzI2HHAMlsQUiw9iDEL/jvFNFJ9M37WkrZ3 d4Bb1iVs23itvmEfoMILvrAESvmTLwbxK5Su3wNY2dBMnFWbNQUDWIp5Qhs+cQ== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1774017896; a=rsa-sha256; cv=none; b=LAFyjCfbO01BmPjsdScn9RlJIRJ8NYx/WRXNVJ+JOgTqMR2pIfOtE2s49IY2qNFhNS7d/E BDhXqrXrXxj4Qtm4VL0t30OjaB5crcCMhnwucwyMp/NyqMjCknuMpNb24iW/GE5dXCSr4u s3pDKB3kUfSuxLJIFWCmoY2RwHzYk2N2rbEV2KnSZpNZsR0x6miy5/Bwc9biUx7WUPd7Pu 2+YWQ+v/SaDb3tHk7qSyVBT9/F0UOsQb5wllB8XeU5ob+C8yDwKyWctM45rhJ5F/o4msr/ 24lYA8Uq2Oi4+37ITb34wtTd5/cWz9trz8n1+03hc4/TPd04Ao5S+V6MRJGUgQ== 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=1774017896; 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=qvV7cRrXm+Y08LswHtEileelHemBEZv17R/pJPLCDlw=; b=ues+bfiVqQrCj6t9Gqkfdfzm2BVnzmXMyX6w0p3q8baJiRK4RxsNFkEbGZV7BvLBpCgYo1 rqpcmPJeOd5FssNqsdbQ7OVRjc8M2gajwN/11SBzYYfrJ9UPi+fOHsnEtfa++Ca5WuoKua /RafDh0AP2DmSVSw1Uj89Yif0iPgSICo4Wgbc6KdWDBneTW90bZyD0KhVCUM872CHC64lM tg8/hs5rQkAg5egwoLYr7iE6Ctrv9NxBqQYtuHpfxs0fZKqBdmOmSF6hL0/MRRwrIf3ltu EH2ojYjc2eQNbXhGYT70M/DatsSqjDbR3XQShPzJkUptaFY82KfQ2jxCk+InCg== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) by mxrelay.nyi.freebsd.org (Postfix) with ESMTP id 4fclhm49nPzTl2 for ; Fri, 20 Mar 2026 14:44:56 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from git (uid 1279) (envelope-from git@FreeBSD.org) id 1c826 by gitrepo.freebsd.org (DragonFly Mail Agent v0.13+ on gitrepo.freebsd.org); Fri, 20 Mar 2026 14:44:51 +0000 To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Navdeep Parhar Subject: git: 0661997cea16 - main - loader(8): embedded MD should be the most preferred currdev List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: np X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 0661997cea165e951e4e215e6aed41596d8b1d52 Auto-Submitted: auto-generated Date: Fri, 20 Mar 2026 14:44:51 +0000 Message-Id: <69bd5d63.1c826.a325412@gitrepo.freebsd.org> The branch main has been updated by np: URL: https://cgit.FreeBSD.org/src/commit/?id=0661997cea165e951e4e215e6aed41596d8b1d52 commit 0661997cea165e951e4e215e6aed41596d8b1d52 Author: Navdeep Parhar AuthorDate: 2026-03-20 00:39:17 +0000 Commit: Navdeep Parhar CommitDate: 2026-03-20 14:40:41 +0000 loader(8): embedded MD should be the most preferred currdev A loader built with MD_IMAGE_SIZE is almost always meant for use with its embedded image and should try that as currdev before anything else. Recent changes (d69fc3a9dc71, 784150fd2535) seem to have relaxed the ZFS code's search for a rootfs and exposed this problem. Reviewed by: imp, tsoome MFC after: 1 week Sponsored by: Chelsio Communications Differential Revision: https://reviews.freebsd.org/D55979 --- stand/efi/loader/main.c | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) diff --git a/stand/efi/loader/main.c b/stand/efi/loader/main.c index f83db2e0668d..1fd6c8d74195 100644 --- a/stand/efi/loader/main.c +++ b/stand/efi/loader/main.c @@ -597,6 +597,15 @@ find_currdev(bool do_bootmgr, char *boot_info, size_t boot_info_sz) } /* Nothing specified, try normal match */ } +#ifdef MD_IMAGE_SIZE + /* + * If there is an embedded MD, try to use that. + */ + printf("Trying MD\n"); + if (probe_md_currdev()) + return (0); +#endif /* MD_IMAGE_SIZE */ + #ifdef EFI_ZFS_BOOT zfsinfo_list_t *zfsinfo = efizfs_get_zfsinfo_list(); zfsinfo_t *zi; @@ -616,15 +625,6 @@ find_currdev(bool do_bootmgr, char *boot_info, size_t boot_info_sz) } #endif /* EFI_ZFS_BOOT */ -#ifdef MD_IMAGE_SIZE - /* - * If there is an embedded MD, try to use that. - */ - printf("Trying MD\n"); - if (probe_md_currdev()) - return (0); -#endif /* MD_IMAGE_SIZE */ - /* * Try to find the block device by its handle based on the * image we're booting. If we can't find a sane partition,