aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMartin Matuska <mm@FreeBSD.org>2021-03-03 01:32:59 +0000
committerMartin Matuska <mm@FreeBSD.org>2021-03-03 01:32:59 +0000
commit19049a2b2bd7119ef7b34102513f6bbfdf9ff862 (patch)
treedd871a8fe8c0f2d685d3bdfefddc5ce9ea929410
parentc7069063144395b025c0ef178431eb2cafdbe1ca (diff)
downloadsrc-19049a2b2bd7119ef7b34102513f6bbfdf9ff862.tar.gz
src-19049a2b2bd7119ef7b34102513f6bbfdf9ff862.zip
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 MFS after: 3 days (direct commit)
-rw-r--r--sys/contrib/openzfs/module/os/freebsd/zfs/dmu_os.c2
1 files changed, 1 insertions, 1 deletions
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;