diff options
| author | martin <martin@NetBSD.org> | 2021-07-06 04:22:34 +0000 |
|---|---|---|
| committer | martin <martin@NetBSD.org> | 2021-07-06 04:22:34 +0000 |
| commit | 45ed2e09b67dd512e2e97058cf2181f60b08d13a (patch) | |
| tree | b2cd4508effac874ee90eeaf3b7f7b4272808b00 /external | |
| parent | fb9fc74a8780a7ae7ffcf12915be74c434d67cd0 (diff) | |
Pull up following revision(s) - all via patch -
(requested by riastradh in ticket #1317):
sys/uvm/uvm_page.c: revision 1.248
sys/uvm/uvm_anon.c: revision 1.80
sys/rump/librump/rumpvfs/vm_vfs.c: revision 1.40
sys/rump/librump/rumpvfs/vm_vfs.c: revision 1.41
sys/rump/librump/rumpkern/vm.c: revision 1.191
sys/uvm/uvm_pager.c: revision 1.130
external/cddl/osnet/dist/uts/common/fs/zfs/zfs_vnops.c: revision 1.71
tests/rump/rumpkern/t_vm.c: revision 1.5
tests/rump/rumpkern/t_vm.c: revision 1.6
sys/rump/librump/rumpvfs/vm_vfs.c: revision 1.39
Move the handling of PG_PAGEOUT from uvm_aio_aiodone_pages() to
uvm_page_unbusy() so that all callers of uvm_page_unbusy() don't need to
handle this flag separately. Split out the pages part of uvm_aio_aiodone()
into uvm_aio_aiodone_pages() in rump just like in the real kernel.
In ZFS functions that can fail to copy data between the ARC and VM pages,
use uvm_aio_aiodone_pages() rather than uvm_page_unbusy() so that we can
handle these "I/O" errors. Fixes PR 55702.
fix an incorrect assertion in the previous commit.
Handle PG_PAGEOUT in uvm_anon_release() too.
Commit the ZFS file that I forgot in this previous commit:
Move the handling of PG_PAGEOUT from uvm_aio_aiodone_pages() to
uvm_page_unbusy() so that all callers of uvm_page_unbusy() don't need to
handle this flag separately. Split out the pages part of uvm_aio_aiodone()
into uvm_aio_aiodone_pages() in rump just like in the real kernel.
In ZFS functions that can fail to copy data between the ARC and VM pages,
use uvm_aio_aiodone_pages() rather than uvm_page_unbusy() so that we can
handle these "I/O" errors. Fixes PR 55702.
update the rump copy of uvm_page_unbusy() to match the real version,
in particular handle PG_PAGEOUT. fixes a few atf tests.
the busypage test is buggy, expect it to fail.
make rump's uvm_aio_aiodone_pages() look more like the kernel version.
fixes some more rumpy assertions.
for the busypage test, replace atf_tc_expect_fail() with atf_tc_skip()
because atf apparently has no way to expect a test program to crash.
fixes PR 55945.
Diffstat (limited to 'external')
| -rw-r--r-- | external/cddl/osnet/dist/uts/common/fs/zfs/zfs_vnops.c | 18 |
1 files changed, 9 insertions, 9 deletions
diff --git a/external/cddl/osnet/dist/uts/common/fs/zfs/zfs_vnops.c b/external/cddl/osnet/dist/uts/common/fs/zfs/zfs_vnops.c index 285995b1764..c7f03764969 100644 --- a/external/cddl/osnet/dist/uts/common/fs/zfs/zfs_vnops.c +++ b/external/cddl/osnet/dist/uts/common/fs/zfs/zfs_vnops.c @@ -6007,6 +6007,12 @@ zfs_netbsd_getpages(void *v) va, DMU_READ_PREFETCH); zfs_unmap_page(pg, va); + if (err != 0) { + uvm_aio_aiodone_pages(ap->a_m, npages, false, err); + memset(ap->a_m, 0, sizeof(ap->a_m[0]) * + npages); + goto out; + } mutex_enter(mtx); pg->flags &= ~(PG_FAKE); pmap_clear_modify(pg); @@ -6023,6 +6029,7 @@ zfs_netbsd_getpages(void *v) mutex_exit(mtx); ap->a_m[ap->a_centeridx] = pg; +out: ZFS_EXIT(zfsvfs); fstrans_done(mp); @@ -6039,14 +6046,13 @@ zfs_putapage(vnode_t *vp, page_t **pp, int count, int flags) voff_t len, klen; int err; - bool async = (flags & PGO_SYNCIO) == 0; bool *cleanedp; struct uvm_object *uobj = &vp->v_uobj; kmutex_t *mtx = uobj->vmobjlock; if (zp->z_sa_hdl == NULL) { err = 0; - goto out_unbusy; + goto out; } /* @@ -6120,14 +6126,8 @@ zfs_putapage(vnode_t *vp, page_t **pp, int count, int flags) } dmu_tx_commit(tx); -out_unbusy: - mutex_enter(mtx); - mutex_enter(&uvm_pageqlock); - uvm_page_unbusy(pp, count); - mutex_exit(&uvm_pageqlock); - mutex_exit(mtx); - out: + uvm_aio_aiodone_pages(pp, count, true, err); return (err); } |
