From nobody Sun Mar 20 14:11:26 2022 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 E75F91A31048; Sun, 20 Mar 2022 14:11:26 +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 "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4KM06Q6B7Tz4sq3; Sun, 20 Mar 2022 14:11:26 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1647785486; 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=8f54H4Qv2YniuaIpbdTIXEk1w/zm1BVAytTLe0cEHjk=; b=n/YYyNVLF0tsuOah8GfwycypfoxymQ19hP9xVMxl8zMkTNnNBLwyrYbPSV7V0XGVjVdcto jMEg0whkrpnPKMECfVysUsOed7zGcT3G6Wwys2q9b+RxI7pBddW/fCtbXfWhEM4Mfo0Hj1 IK3V49MB2CyuJs4/gddcFckmdK6O1eKk5o2w5j8EmVyrnOO5E87FbyoROmW9Wi+wuEE2F1 fbqxrTCJ4D83Z0OSALmwtjjpMhmX8WeV7mLVSBQhIgxkL++7NbnxCQwJLo47ZpNJSQ6jZ+ iskA9yfRA2My9YZn4YHs4H06xl/Gt3LMR/RZaTqGKsQuabVh01ns9lmmE2xM6A== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (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 did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id B457E759; Sun, 20 Mar 2022 14:11:26 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.16.1/8.16.1) with ESMTP id 22KEBQ2N043499; Sun, 20 Mar 2022 14:11:26 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 22KEBQFJ043498; Sun, 20 Mar 2022 14:11:26 GMT (envelope-from git) Date: Sun, 20 Mar 2022 14:11:26 GMT Message-Id: <202203201411.22KEBQFJ043498@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Mark Johnston Subject: git: b8ae329db949 - releng/13.0 - Restore dirty dnode detection logic 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: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: dev-commits-src-all@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: markj X-Git-Repository: src X-Git-Refname: refs/heads/releng/13.0 X-Git-Reftype: branch X-Git-Commit: b8ae329db949868b8275091da0844ffbff50c65a Auto-Submitted: auto-generated ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1647785486; 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=8f54H4Qv2YniuaIpbdTIXEk1w/zm1BVAytTLe0cEHjk=; b=yDu2AfnJHbArA1EUG4yZSnfhxbH2AXjxPOPMYpdM86dp2qfdcezT/XAHy433dVZfuSx5PF Ergk/0LCR+IFFRrgftzrzog3+HvA3MmDNvKLjhywh8b9xgq0wuiYka12psf1FpYrVApvCE Hjhpxxl6j1gOYxP/9NMnYK8oaA8m6GyPmhVzccm0ZO3OFnLWI48lErnooI0j8FzYV5r8F3 TF5caTW0z4U3GHVvXfaqQgq0lT9vMbkcZBKdc/KCBXe+2apbzONrwiF0XFxJ6xq9fkMRju VJfJademCKh7eMrP4DJiG4flsGr5ZbcKlE4tbXqdqxYH5CVs1EGM02PViySmOg== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1647785486; a=rsa-sha256; cv=none; b=MNNUXE9OGx2+PykF0AoaFipfRPEZE4wlHIV5wYSR/+jVZwozFUPHwIT2eL9oeOijBlQWf9 UkqLzaOVxn5Kiym1OHqpZAJDgTW4u//pFfuth8IBG15zjTUX/Pfy6QcI7Y/k98/cSOhNfV +hPL/ARRuA/5Hla51K0NvpCBF8UGREPRpUiN8XnkqDDd06w+MIjcT2xTcsl/x2yPdrf92Q gp1lcCmzW9PpPoeS1pEuSSkdMRpyghJopWXOo2GKtear+UZBIu7yysJDhsC/l3ITMhJG6W ti04B3PFwkAJd0pE/mbVZpzQ/bSL5XKXzCiccgtY4Kj73Sz0OaSNp4QVGkh3OQ== ARC-Authentication-Results: i=1; mx1.freebsd.org; none X-ThisMailContainsUnwantedMimeParts: N The branch releng/13.0 has been updated by markj: URL: https://cgit.FreeBSD.org/src/commit/?id=b8ae329db949868b8275091da0844ffbff50c65a commit b8ae329db949868b8275091da0844ffbff50c65a Author: Brian Behlendorf AuthorDate: 2021-11-11 00:14:32 +0000 Commit: Mark Johnston CommitDate: 2022-03-20 14:10:36 +0000 Restore dirty dnode detection logic In addition to flushing memory mapped regions when checking holes, commit de198f2d95 modified the dirty dnode detection logic to check the dn->dn_dirty_records instead of the dn->dn_dirty_link. Relying on the dirty record has not be reliable, switch back to the previous method. Signed-off-by: Brian Behlendorf Issue #11900 Closes #12745 (cherry picked from commit d7e640cf95f72deeca501d34afed59a0bc9d7940) Approved by: so Security: FreeBSD-EN-22:13.zfs --- sys/contrib/openzfs/module/zfs/dnode.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sys/contrib/openzfs/module/zfs/dnode.c b/sys/contrib/openzfs/module/zfs/dnode.c index 8592c5f8c3a9..b69ba68ec780 100644 --- a/sys/contrib/openzfs/module/zfs/dnode.c +++ b/sys/contrib/openzfs/module/zfs/dnode.c @@ -1661,7 +1661,7 @@ dnode_is_dirty(dnode_t *dn) mutex_enter(&dn->dn_mtx); for (int i = 0; i < TXG_SIZE; i++) { - if (list_head(&dn->dn_dirty_records[i]) != NULL) { + if (multilist_link_active(&dn->dn_dirty_link[i])) { mutex_exit(&dn->dn_mtx); return (B_TRUE); }