From nobody Mon Nov 23 15:01:21 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 4jY8KF4bKxz6w8Xr for ; Mon, 23 Nov 2026 15:01:21 +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) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id 4jY8KF40W3z4pFJ for ; Mon, 23 Nov 2026 15:01:21 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1795446081; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=CsvXQZdzPNu0Ex4PX3pO8eZxl4W5z5oMn5dyCbwHfIM=; b=Y7YGrTvgoCalYocMtrA7UA2cg9m98jiRcgHjm6NWV6Hc+uQvESC88nJc62FS+jgHHmy4jR mWz/5NpBAqQmImblMFCr1P9iixAiGd1BOsUbJwMOUMPhJem5m8mZnjyx3EHNax6Ine+OCn oJNBfIThT3Fv1J2qFHFbaSs6tGfSHw3pavMtdOg9dIEKe1CMiOfWbM21bcVodf42pQipVG AYjq1TCZB87QML6KRtffoZT/2anzIStDwJc1dyqKD3mFsvUsK+oG5HR7GVXv3Oa0lM/Hfb rphaFLkgHHO7O4gSSh8mpB0BYw8wtfUiK2KuJI47kmoHuvGlckXNR73hPKn6vA== ARC-Seal: i=1; a=rsa-sha256; d=freebsd.org; s=dkim; cv=none; t=1795446081; b=HZqEORSVfOEp7AY6CK6bkWJjWxbLzmXTV9/f9gmOSTQgH8a3NJfE0BF0aSi+pR+gYNShBP ga8GuSCkP+8br9KILcnzvDUfLoy6kNzUr+unt2/eJfEAubDcBigoUuazsXQ0wJNExSBWS1 MgS4exzbq9hV/PktUIvveK2gZSDtBldFEJYBpva1jICNmVK3LihMOCV+q9PBx2wI/PCNLX Rc0UPE9PM9/jHsx0QmuCXE/IX70OJAx+uetvhcMG5l3nGloqGo5uS/+93u/b8xBb+qof8d JPznFKgL6/h+3n4PaT3F5Mfeni+5APv1S7Q01rUXgRgeiKSF48hAa9MXJgg8GA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1795446081; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=CsvXQZdzPNu0Ex4PX3pO8eZxl4W5z5oMn5dyCbwHfIM=; b=e6bjKRqZMyAOzncEcZBdLhTwHkNdVeeFOfU0Iq8p7ixUbcWcqVx6yO2tzH3JM5qoZ5RNrh aS0PME3SE7d208yu+uwIH4ammxa4Btgp33t2W1X1OCvBCst6IUSBFeY3dwNE48GsFKDw7z xoraxWBByOwvTb6yZbFgsD0GzK1e7/87KmbPNiwBHbunk48EPhOvnZSO2dIJGi0StFYebr JeLVk9SFw/LnZKEi7n8NLj1eMibfSvI2T1vqKJ8HnlOCx3U8wpb+lkGV0kAR4A7/K1vpmU rQ3IB9Q/K2Nen3QPagJfQ2EoDXHsP6dKhrXUVqvw7MxLl28joQefJsOqblffKg== 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 4jY8KF3TgXzw7x for ; Mon, 23 Nov 2026 15:01:21 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from git (uid 1279) (envelope-from git@FreeBSD.org) id 11c6b by gitrepo.freebsd.org (DragonFly Mail Agent v0.13+ on gitrepo.freebsd.org); Mon, 23 Nov 2026 15:01:21 +0000 To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org Cc: Ryan Moeller From: Igor Ostapenko Subject: git: 5d6bdb30a792 - stable/15 - dnode_sync: Relax constraint on indirect freeing List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all X-BeenThere: dev-commits-src-all@freebsd.org List-Id: Commit messages for all branches of the src repository 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: igoro X-Git-Repository: src X-Git-Refname: refs/heads/stable/15 X-Git-Reftype: branch X-Git-Commit: 5d6bdb30a792358efeb5a14255d399236627d6ef Auto-Submitted: auto-generated Date: Mon, 23 Nov 2026 15:01:21 +0000 Message-Id: <6b045541.11c6b.682d63d5@gitrepo.freebsd.org> The branch stable/15 has been updated by igoro: URL: https://cgit.FreeBSD.org/src/commit/?id=5d6bdb30a792358efeb5a14255d399236627d6ef commit 5d6bdb30a792358efeb5a14255d399236627d6ef Author: Ryan Moeller AuthorDate: 2026-06-12 18:43:58 +0000 Commit: Igor Ostapenko CommitDate: 2026-11-23 14:16:51 +0000 dnode_sync: Relax constraint on indirect freeing One of the roles of the dnode sync thread is freeing. There are two modes of this operation: freeing a portion of an object, and freeing the object itself. Freeing is handled by `free_children()`. This function verifies that if the dnode has children there must be at least one marked as dirty before proceeding to recursively free the tree of block pointers. As described in a comment, this VERIFY is overly strict. In practice, children may not be marked as dirty when the dnode itself is being freed. Relax the VERIFY slightly by avoiding the VERIFY when indirect blocks are to be immediately freed, to more closely match the comment motivating the VERIFY. While here, clarify the logic of the test by using VERIFY_IMPLY instead of chaining multiple tests. Sponsored-by: Cybersecure Pty Ltd Reviewed-by: Brian Behlendorf Reviewed-by: Alexander Motin Signed-off-by: Ryan Moeller Closes #18822 (cherry picked from commit 242105f01012bf07cc896a4fb5cdb1385ef58220) --- sys/contrib/openzfs/module/zfs/dnode_sync.c | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/sys/contrib/openzfs/module/zfs/dnode_sync.c b/sys/contrib/openzfs/module/zfs/dnode_sync.c index 0e070c69dcd6..199ac045679d 100644 --- a/sys/contrib/openzfs/module/zfs/dnode_sync.c +++ b/sys/contrib/openzfs/module/zfs/dnode_sync.c @@ -305,9 +305,12 @@ free_children(dmu_buf_impl_t *db, uint64_t blkid, uint64_t nblks, * ancestor of the first or last block to be freed. The first and * last L1 indirect blocks are always dirtied by dnode_free_range(). */ - db_lock_type_t dblt = dmu_buf_lock_parent(db, RW_READER, FTAG); - VERIFY(BP_GET_FILL(db->db_blkptr) == 0 || db->db_dirtycnt > 0); - dmu_buf_unlock_parent(db, dblt, FTAG); + if (!free_indirects) { + db_lock_type_t dblt = dmu_buf_lock_parent(db, RW_READER, FTAG); + VERIFY_IMPLY(BP_GET_FILL(db->db_blkptr) > 0, + db->db_dirtycnt > 0); + dmu_buf_unlock_parent(db, dblt, FTAG); + } dbuf_release_bp(db); bp = db->db.db_data;