mirror_zfs/module/os/freebsd/spl
Rob Norris 238eab7dc1 FreeBSD: zfs_putpages: don't undirty pages until after write completes
zfs_putpages() would put the entire range of pages onto the ZIL, then
return VM_PAGER_OK for each page to the kernel. However, an associated
zil_commit() or txg sync had not happened at this point, so the write
may not actually be on disk.

So, we rework it to use a ZIL commit callback, and do the post-write
work of undirtying the page and signaling completion there. We return
VM_PAGER_PEND to the kernel instead so it knows that we will take care
of it.

Sponsored-by: Klara, Inc.
Sponsored-by: Wasabi Technology, Inc.
Reviewed-by: Mark Johnston <markj@FreeBSD.org>
Reviewed-by: Alexander Motin <mav@FreeBSD.org>
Signed-off-by: Rob Norris <rob.norris@klarasystems.com>
Closes #17445
2025-06-12 14:45:18 -07:00
..
acl_common.c SPDX: license tags: CDDL-1.0 2025-03-13 17:56:27 -07:00
callb.c SPDX: license tags: CDDL-1.0 2025-03-13 17:56:27 -07:00
list.c SPDX: license tags: CDDL-1.0 2025-03-13 17:56:27 -07:00
spl_acl.c SPDX: license tags: BSD-2-Clause 2025-03-13 17:56:46 -07:00
spl_atomic.c SPDX: license tags: BSD-2-Clause 2025-03-13 17:56:46 -07:00
spl_cmn_err.c SPDX: license tags: CDDL-1.0 2025-03-13 17:56:27 -07:00
spl_dtrace.c SPDX: license tags: BSD-2-Clause 2025-03-13 17:56:46 -07:00
spl_kmem.c SPDX: license tags: BSD-2-Clause 2025-03-13 17:56:46 -07:00
spl_kstat.c freebsd/kstat: allow multi-level module names 2025-03-20 16:25:32 -07:00
spl_misc.c SPDX: license tags: BSD-2-Clause 2025-03-13 17:56:46 -07:00
spl_policy.c cred: properly pass and test creds on other threads (#17273) 2025-04-29 16:27:48 -07:00
spl_procfs_list.c SPDX: license tags: BSD-2-Clause 2025-03-13 17:56:46 -07:00
spl_string.c SPDX: license tags: CDDL-1.0 2025-03-13 17:56:27 -07:00
spl_sunddi.c SPDX: license tags: BSD-2-Clause 2025-03-13 17:56:46 -07:00
spl_sysevent.c SPDX: license tags: BSD-2-Clause 2025-03-13 17:56:46 -07:00
spl_taskq.c SPDX: license tags: BSD-2-Clause 2025-03-13 17:56:46 -07:00
spl_uio.c SPDX: license tags: CDDL-1.0 2025-03-13 17:56:27 -07:00
spl_vfs.c spl_vfs: fix vrele task runner signature mismatch 2025-03-19 11:26:45 -04:00
spl_vm.c FreeBSD: zfs_putpages: don't undirty pages until after write completes 2025-06-12 14:45:18 -07:00
spl_zlib.c SPDX: license tags: BSD-2-Clause 2025-03-13 17:56:46 -07:00
spl_zone.c SPDX: license tags: BSD-2-Clause 2025-03-13 17:56:46 -07:00