From owner-dev-commits-src-branches@freebsd.org Sat Mar 6 20:25:33 2021 Return-Path: Delivered-To: dev-commits-src-branches@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id ADB69571FD9; Sat, 6 Mar 2021 20:25:33 +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 4DtGM14ZgFz4p1q; Sat, 6 Mar 2021 20:25:33 +0000 (UTC) (envelope-from git@FreeBSD.org) 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 9079618A2; Sat, 6 Mar 2021 20:25:33 +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 126KPX2Z074478; Sat, 6 Mar 2021 20:25:33 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 126KPXxC074477; Sat, 6 Mar 2021 20:25:33 GMT (envelope-from git) Date: Sat, 6 Mar 2021 20:25:33 GMT Message-Id: <202103062025.126KPXxC074477@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Martin Matuska Subject: git: d2faf2e6b2d4 - releng/13.0 - zfs: fix assert in FreeBSD-specific dmu_read_pages MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: mm X-Git-Repository: src X-Git-Refname: refs/heads/releng/13.0 X-Git-Reftype: branch X-Git-Commit: d2faf2e6b2d43eafbae27a6d4909984c260e2631 Auto-Submitted: auto-generated X-BeenThere: dev-commits-src-branches@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: Commits to the stable branches of the FreeBSD src repository List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 06 Mar 2021 20:25:33 -0000 The branch releng/13.0 has been updated by mm: URL: https://cgit.FreeBSD.org/src/commit/?id=d2faf2e6b2d43eafbae27a6d4909984c260e2631 commit d2faf2e6b2d43eafbae27a6d4909984c260e2631 Author: Martin Matuska AuthorDate: 2021-03-03 01:32:59 +0000 Commit: Martin Matuska CommitDate: 2021-03-06 20:23:22 +0000 zfs: fix assert in FreeBSD-specific dmu_read_pages From the openzfs 2e160dee9 commit message: The function has three similar pieces of code: for read-behind pages, requested pages and read-ahead pages. All three pieces had an assert to ensure that the page is not mapped. Later the assert was relaxed to require that the page is not mapped for writing. But that was done in two places out of three. This change fixes the third piece, read-ahead. Obtained from: openzfs/zfs@2e160dee97a4badbc318561f76ea56451c916d2f Approved by: re (delphij) (cherry picked from commit 19049a2b2bd7119ef7b34102513f6bbfdf9ff862) --- sys/contrib/openzfs/module/os/freebsd/zfs/dmu_os.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sys/contrib/openzfs/module/os/freebsd/zfs/dmu_os.c b/sys/contrib/openzfs/module/os/freebsd/zfs/dmu_os.c index 8e412d9c1359..fb8f560316ea 100644 --- a/sys/contrib/openzfs/module/os/freebsd/zfs/dmu_os.c +++ b/sys/contrib/openzfs/module/os/freebsd/zfs/dmu_os.c @@ -319,7 +319,7 @@ dmu_read_pages(objset_t *os, uint64_t object, vm_page_t *ma, int count, break; } ASSERT(m->dirty == 0); - ASSERT(!pmap_page_is_mapped(m)); + ASSERT(!pmap_page_is_write_mapped(m)); ASSERT(db->db_size > PAGE_SIZE); bufoff = IDX_TO_OFF(m->pindex) % db->db_size;