git: 46ac8f2e7d96 - main - zfs: don't use zfs_freebsd_copy_file_range

From: Mateusz Guzik <mjg_at_FreeBSD.org>
Date: Sat, 15 Apr 2023 21:36:34 UTC
The branch main has been updated by mjg:

URL: https://cgit.FreeBSD.org/src/commit/?id=46ac8f2e7d9601311eb9b3cd2fed138ff4a11a66

commit 46ac8f2e7d9601311eb9b3cd2fed138ff4a11a66
Author:     Mateusz Guzik <mjg@FreeBSD.org>
AuthorDate: 2023-04-15 20:23:24 +0000
Commit:     Mateusz Guzik <mjg@FreeBSD.org>
CommitDate: 2023-04-15 21:34:54 +0000

    zfs: don't use zfs_freebsd_copy_file_range
    
    There is one data corruption problem reported and fixed upstream, not
    cherry-picked here yet.
    
    On top of it the following fires under load:
            VERIFY(zil_replaying(zfsvfs->z_log, tx));
    
    The patch which introduced the entire machinery is a revert candidate,
    but as the machinery came with a dedicated feature flag, doing so would
    render affected pools read-only at best. To be figured out.
    
    As a temporary bandaid at least stop the active usage.
    Note this patch does not make the feature disappear from zpool upgrade.
    
    Sponsored by:   Rubicon Communications, LLC ("Netgate")
---
 sys/contrib/openzfs/module/os/freebsd/zfs/zfs_vnops_os.c | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/sys/contrib/openzfs/module/os/freebsd/zfs/zfs_vnops_os.c b/sys/contrib/openzfs/module/os/freebsd/zfs/zfs_vnops_os.c
index 8a0a1d07c590..7b5fe8a3abe0 100644
--- a/sys/contrib/openzfs/module/os/freebsd/zfs/zfs_vnops_os.c
+++ b/sys/contrib/openzfs/module/os/freebsd/zfs/zfs_vnops_os.c
@@ -6214,6 +6214,7 @@ zfs_deallocate(struct vop_deallocate_args *ap)
 }
 #endif
 
+#if 0
 #ifndef _SYS_SYSPROTO_H_
 struct vop_copy_file_range_args {
 	struct vnode *a_invp;
@@ -6309,6 +6310,7 @@ bad_write_fallback:
 	    ap->a_incred, ap->a_outcred, ap->a_fsizetd);
 	return (error);
 }
+#endif
 
 struct vop_vector zfs_vnodeops;
 struct vop_vector zfs_fifoops;
@@ -6373,7 +6375,6 @@ struct vop_vector zfs_vnodeops = {
 #if __FreeBSD_version >= 1400043
 	.vop_add_writecount =	vop_stdadd_writecount_nomsync,
 #endif
-	.vop_copy_file_range =	zfs_freebsd_copy_file_range,
 };
 VFS_VOP_VECTOR_REGISTER(zfs_vnodeops);