From def73c0735002ffe2b63d5450593c11f830c9b63 Mon Sep 17 00:00:00 2001 From: Ryan Moeller Date: Fri, 10 Dec 2021 14:15:27 +0000 Subject: [PATCH] FreeBSD: Add vop_standard_writecount_nomsync https://cgit.freebsd.org/src/commit?id=3ffcfa599e29686cf2b3c1a6087408c37acaed78 Reviewed-by: Tony Hutter Reviewed-by: Brian Behlendorf Reviewed-by: Alexander Motin Signed-off-by: Ryan Moeller Closes #12828 --- module/os/freebsd/zfs/zfs_ctldir.c | 9 +++++++++ module/os/freebsd/zfs/zfs_vnops_os.c | 9 +++++++++ 2 files changed, 18 insertions(+) diff --git a/module/os/freebsd/zfs/zfs_ctldir.c b/module/os/freebsd/zfs/zfs_ctldir.c index a9fe1b6472..cde40e8769 100644 --- a/module/os/freebsd/zfs/zfs_ctldir.c +++ b/module/os/freebsd/zfs/zfs_ctldir.c @@ -815,6 +815,9 @@ static struct vop_vector zfsctl_ops_root = { .vop_vptocnp = zfsctl_root_vptocnp, .vop_pathconf = zfsctl_common_pathconf, .vop_getacl = zfsctl_common_getacl, +#if __FreeBSD_version >= 1400043 + .vop_add_writecount = vop_stdadd_writecount_nomsync, +#endif }; VFS_VOP_VECTOR_REGISTER(zfsctl_ops_root); @@ -1134,6 +1137,9 @@ static struct vop_vector zfsctl_ops_snapdir = { .vop_print = zfsctl_common_print, .vop_pathconf = zfsctl_common_pathconf, .vop_getacl = zfsctl_common_getacl, +#if __FreeBSD_version >= 1400043 + .vop_add_writecount = vop_stdadd_writecount_nomsync, +#endif }; VFS_VOP_VECTOR_REGISTER(zfsctl_ops_snapdir); @@ -1238,6 +1244,9 @@ static struct vop_vector zfsctl_ops_snapshot = { .vop_islocked = vop_stdislocked, .vop_advlockpurge = vop_stdadvlockpurge, /* called by vgone */ .vop_print = zfsctl_common_print, +#if __FreeBSD_version >= 1400043 + .vop_add_writecount = vop_stdadd_writecount_nomsync, +#endif }; VFS_VOP_VECTOR_REGISTER(zfsctl_ops_snapshot); diff --git a/module/os/freebsd/zfs/zfs_vnops_os.c b/module/os/freebsd/zfs/zfs_vnops_os.c index 08d41d384d..8e48f78b73 100644 --- a/module/os/freebsd/zfs/zfs_vnops_os.c +++ b/module/os/freebsd/zfs/zfs_vnops_os.c @@ -6133,6 +6133,9 @@ struct vop_vector zfs_vnodeops = { .vop_unlock = vop_unlock, .vop_islocked = vop_islocked, #endif +#if __FreeBSD_version >= 1400043 + .vop_add_writecount = vop_stdadd_writecount_nomsync, +#endif }; VFS_VOP_VECTOR_REGISTER(zfs_vnodeops); @@ -6157,6 +6160,9 @@ struct vop_vector zfs_fifoops = { .vop_getacl = zfs_freebsd_getacl, .vop_setacl = zfs_freebsd_setacl, .vop_aclcheck = zfs_freebsd_aclcheck, +#if __FreeBSD_version >= 1400043 + .vop_add_writecount = vop_stdadd_writecount_nomsync, +#endif }; VFS_VOP_VECTOR_REGISTER(zfs_fifoops); @@ -6176,5 +6182,8 @@ struct vop_vector zfs_shareops = { .vop_reclaim = zfs_freebsd_reclaim, .vop_fid = zfs_freebsd_fid, .vop_pathconf = zfs_freebsd_pathconf, +#if __FreeBSD_version >= 1400043 + .vop_add_writecount = vop_stdadd_writecount_nomsync, +#endif }; VFS_VOP_VECTOR_REGISTER(zfs_shareops);