From nobody Sat Oct 03 17:34:58 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 4hxt83239Wz6vmR4 for ; Sat, 03 Oct 2026 17:34:59 +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 "YR2" (not verified)) by mx1.freebsd.org (Postfix) with ESMTPS id 4hxt826Sq4z4lBq for ; Sat, 03 Oct 2026 17:34:58 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1791048898; 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=jrOOqmK5KVGCOdN4yCSEpZzqwZZ9dqJB36srk+h+I18=; b=uzaurLSqKdbeKEh7Ri7t7ZvIexNmM71UYWyRMjQuwGlABJ1CuWqKZK74hMmdpZPx2qHKFA y+0XIUgKTifLpdoFJwaqvry5mei2c9sn/9xugXuGrBjs5Ei25BZelPThCodFycqX1rEHm9 St0vj7h2k8POFcrmMeWQEUS2HNpXG1JDPqmj3KMR2WC1c6NK9LuV+M6NgKH1c7yZ0NBE0V Nx0jQ6v0cw/cNwcR0GL1Z+E2zAoHV6rLxGDe/39TbdcS+HqkO4jWizpL+l9UBqtv2FimU1 hEs3j7kJFFouWUytDEv7u3S5c2qt8U/uWutCMDZHTLuYNuafZhMKMgW2uETKeA== ARC-Seal: i=1; a=rsa-sha256; d=freebsd.org; s=dkim; cv=none; t=1791048898; b=xtEZCDc2kHmsbpKXiE9utQSDdbCQAzu67BN+tozQ4rdkp4N2gC2tvG+quae92TEeBaCJRk TGdsnSTkk3zdXe0mjRi3c4tSP5N96sMdTLJwH6b5KhZORc2A4pkAz/h1cTgtTdXV7YieAV TaL3lNjAEOsCMxJr+x2I1NgoMZkaTLoNF4QnEfARfXlG8dvUQfcvoRJNG0HIlDuhofPmJQ Go6+ew/IOYU4sz01a/69A/0W1TrdqdNcvYoBSkIhi8P8xnCm3JzARvfyxrPUyXbI9ZFX3F EKShy59fKZZeWpqB7ACRd6LX14sqXJX4zY/FoBRHYD/tqBtmxQ4HdlXLMYctsA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1791048898; 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=jrOOqmK5KVGCOdN4yCSEpZzqwZZ9dqJB36srk+h+I18=; b=Vz56GrqaGVJtY1oLyJwNDgo1yJvwIY/eMNTPptNkcrzkEy4W+WOT2kGflW8t1tnahNm/4s w/Bneo1gUX1RJuqk8oPKp53xu4uU7R1jXgbknlHoNHwh1g9ZfwsH8GtgwZI3jL8AaEWtY9 RGSHaBbm1va0tcjKZSZeBfJW0tKDjUsuTHLmO44DmuQnADaRo1ZN0SGCkYLqOLRvXROMf/ rRjBFNcKdE4qD3g+62NMGXaXPgc3IWZHV8ShRUAj00TkCstcHcDIbTAPN9VJkv6TWikMHn f/kV+PSs5V/e+Etv6/Rx5m49QhFPAumpH/grpr2AUtwBYWkEQYViH2Wjy/Qo2A== ARC-Authentication-Results: i=1; mx1.freebsd.org; none Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) by mxrelay.nyi.freebsd.org (Postfix) with ESMTP id 4hxt825FMkz1CNs for ; Sat, 03 Oct 2026 17:34:58 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from git (uid 1279) (envelope-from git@FreeBSD.org) id 1eb97 by gitrepo.freebsd.org (DragonFly Mail Agent v0.13+ on gitrepo.freebsd.org); Sat, 03 Oct 2026 17:34:58 +0000 To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Warner Losh Subject: git: 262fa4695d90 - main - stand: Implement zfs_dnode_readlink in terms of zfs_dnode_sa_lookup 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 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: 262fa4695d90207b9080f2cc5cb01eccf07fe243 Auto-Submitted: auto-generated Date: Sat, 03 Oct 2026 17:34:58 +0000 Message-Id: <6ac13cc2.1eb97.759012d4@gitrepo.freebsd.org> The branch main has been updated by imp: URL: https://cgit.FreeBSD.org/src/commit/?id=262fa4695d90207b9080f2cc5cb01eccf07fe243 commit 262fa4695d90207b9080f2cc5cb01eccf07fe243 Author: Warner Losh AuthorDate: 2026-10-03 14:42:58 +0000 Commit: Warner Losh CommitDate: 2026-10-03 17:32:08 +0000 stand: Implement zfs_dnode_readlink in terms of zfs_dnode_sa_lookup Get the link offset using the zfs_dnode_sa_lookup helper now. Recently, the symbolic links we rely on in the boot loader have stopped working. Prior to OpenZFS commit e90badec11d3 ("Inherit the project ID for every object type", Matt Turner, 2026-08-14), symbolic link information was written at a fixed offset in the SA data. Since that commit, the inherited PROJIDs mean that all pools with quota enabled have started writing symbolic links with a new, non-fixed offset. Old symbolic links remained unchanged, but new ones were written with a different offset. At work, we have all these things: rewritten BEs, quotas, and a dependence on symbolic links in our boot path. This came in on 2026-08-24 OpenZFS merge (22649d4dba73). This was 12 hours after stab week for August, so we didn't hit this until the September stab week. Since the new kernel has to write links at the new offset, the initial tests worked, but the second ones didn't. Sponsored by: Netflix Differential Revision: https://reviews.freebsd.org/D60268 --- stand/libsa/zfs/zfsimpl.c | 35 ++++------------------------------- 1 file changed, 4 insertions(+), 31 deletions(-) diff --git a/stand/libsa/zfs/zfsimpl.c b/stand/libsa/zfs/zfsimpl.c index a13f8d805049..5447fd825c24 100644 --- a/stand/libsa/zfs/zfsimpl.c +++ b/stand/libsa/zfs/zfsimpl.c @@ -3995,38 +3995,11 @@ zfs_dnode_readlink(struct zfsmount *mount, dnode_phys_t *dn, char *path, int rc = 0; if (dn->dn_bonustype == DMU_OT_SA) { - sa_hdr_phys_t *sahdrp = NULL; - size_t size = 0; - void *buf = NULL; - int hdrsize; - char *p; - - if (dn->dn_bonuslen != 0) { - sahdrp = (sa_hdr_phys_t *)DN_BONUS(dn); - } else { - blkptr_t *bp; - - if ((dn->dn_flags & DNODE_FLAG_SPILL_BLKPTR) == 0) - return (EIO); - bp = DN_SPILL_BLKPTR(dn); + size_t size = psize; - size = BP_GET_LSIZE(bp); - buf = malloc(size); - if (buf == NULL) - rc = ENOMEM; - else - rc = zio_read(mount->spa, bp, buf); - if (rc != 0) { - free(buf); - return (rc); - } - sahdrp = buf; - } - hdrsize = SA_HDR_SIZE(sahdrp); - p = (char *)((uintptr_t)sahdrp + hdrsize + SA_SYMLINK_OFFSET); - memcpy(path, p, psize); - free(buf); - return (0); + rc = zfs_dnode_sa_lookup(mount, dn, ZFS_SA_SYMLINK, path, + &size); + return (rc != 0 ? rc : (size == psize ? 0 : EIO)); } /* * Second test is purely to silence bogus compiler