Skip to content

FreeBSD: Remove references to DEBUG_VFS_LOCKS#18136

Merged
behlendorf merged 1 commit intoopenzfs:masterfrom
markjdb:master
Jan 19, 2026
Merged

FreeBSD: Remove references to DEBUG_VFS_LOCKS#18136
behlendorf merged 1 commit intoopenzfs:masterfrom
markjdb:master

Conversation

@markjdb
Copy link
Contributor

@markjdb markjdb commented Jan 15, 2026

Motivation and Context

FreeBSD used to have a separate debug option for VFS invariants checking, DEBUG_VFS_LOCKS. This was removed upstream since developers (including me) often forgot to enable it. Now these checks are enabled by the standard INVARIANTS option.

Description

ZFS had a couple of references to DEBUG_VFS_LOCKS. The change removes them without removing the correpsonding check.

How Has This Been Tested?

Built with --enable-invariants and --disable-invariants.

Types of changes

  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Performance enhancement (non-breaking change which improves efficiency)
  • Code cleanup (non-breaking change which makes code smaller or more readable)
  • Quality assurance (non-breaking change which makes the code more robust against bugs)
  • Breaking change (fix or feature that would cause existing functionality to change)
  • Library ABI change (libzfs, libzfs_core, libnvpair, libuutil and libzfsbootenv)
  • Documentation (a change to man pages or other documentation)

Checklist:

This option is removed upstream in favour of plain INVARIANTS.

VNASSERT is always defined so I see no reason to use it conditionally.

Signed-off-by: Mark Johnston <markj@FreeBSD.org>
Copilot AI review requested due to automatic review settings January 15, 2026 14:49
Copy link

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This PR removes references to the obsolete FreeBSD DEBUG_VFS_LOCKS option, which has been superseded by the standard INVARIANTS option. The change removes conditional compilation directives while preserving the actual assertion check functionality.

Changes:

  • Removed the VNCHECKREF macro definition that was conditionally compiled with DEBUG_VFS_LOCKS
  • Removed the conditional variable declaration vnode_t *dvp that was only used for the macro
  • Removed the build system configuration for WITH_VFS_DEBUG in module/Makefile.bsd
  • Replaced the macro invocation with a direct VNASSERT call

Reviewed changes

Copilot reviewed 2 out of 2 changed files in this pull request and generated no comments.

File Description
module/os/freebsd/zfs/zfs_vnops_os.c Removed DEBUG_VFS_LOCKS macro definition and conditional variable, replaced macro usage with direct VNASSERT call
module/Makefile.bsd Removed build configuration for WITH_VFS_DEBUG option

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

@amotin amotin added the Status: Accepted Ready to integrate (reviewed, tested) label Jan 15, 2026
@behlendorf behlendorf merged commit 54b141f into openzfs:master Jan 19, 2026
45 of 48 checks passed
amotin pushed a commit to amotin/zfs that referenced this pull request Jan 29, 2026
This option is removed upstream in favour of plain INVARIANTS.

VNASSERT is always defined so I see no reason to use it conditionally.

Reviewed-by: Brian Behlendorf <behlendorf1@llnl.gov>
Reviewed-by: Alexander Motin <alexander.motin@TrueNAS.com>
Signed-off-by: Mark Johnston <markj@FreeBSD.org>
Closes openzfs#18136
mcmilk pushed a commit to mcmilk/zfs that referenced this pull request Jan 31, 2026
This option is removed upstream in favour of plain INVARIANTS.

VNASSERT is always defined so I see no reason to use it conditionally.

Reviewed-by: Brian Behlendorf <behlendorf1@llnl.gov>
Reviewed-by: Alexander Motin <alexander.motin@TrueNAS.com>
Signed-off-by: Mark Johnston <markj@FreeBSD.org>
Closes openzfs#18136
amotin pushed a commit to amotin/zfs that referenced this pull request Feb 3, 2026
This option is removed upstream in favour of plain INVARIANTS.

VNASSERT is always defined so I see no reason to use it conditionally.

Reviewed-by: Brian Behlendorf <behlendorf1@llnl.gov>
Reviewed-by: Alexander Motin <alexander.motin@TrueNAS.com>
Signed-off-by: Mark Johnston <markj@FreeBSD.org>
Closes openzfs#18136
amotin pushed a commit to amotin/zfs that referenced this pull request Feb 3, 2026
This option is removed upstream in favour of plain INVARIANTS.

VNASSERT is always defined so I see no reason to use it conditionally.

Reviewed-by: Brian Behlendorf <behlendorf1@llnl.gov>
Reviewed-by: Alexander Motin <alexander.motin@TrueNAS.com>
Signed-off-by: Mark Johnston <markj@FreeBSD.org>
Closes openzfs#18136
lundman pushed a commit to openzfsonosx/openzfs-fork that referenced this pull request Feb 5, 2026
This option is removed upstream in favour of plain INVARIANTS.

VNASSERT is always defined so I see no reason to use it conditionally.

Reviewed-by: Brian Behlendorf <behlendorf1@llnl.gov>
Reviewed-by: Alexander Motin <alexander.motin@TrueNAS.com>
Signed-off-by: Mark Johnston <markj@FreeBSD.org>
Closes openzfs#18136
tonyhutter pushed a commit that referenced this pull request Feb 5, 2026
This option is removed upstream in favour of plain INVARIANTS.

VNASSERT is always defined so I see no reason to use it conditionally.

Reviewed-by: Brian Behlendorf <behlendorf1@llnl.gov>
Reviewed-by: Alexander Motin <alexander.motin@TrueNAS.com>
Signed-off-by: Mark Johnston <markj@FreeBSD.org>
Closes #18136
tonyhutter pushed a commit to tonyhutter/zfs that referenced this pull request Feb 12, 2026
This option is removed upstream in favour of plain INVARIANTS.

VNASSERT is always defined so I see no reason to use it conditionally.

Reviewed-by: Brian Behlendorf <behlendorf1@llnl.gov>
Reviewed-by: Alexander Motin <alexander.motin@TrueNAS.com>
Signed-off-by: Mark Johnston <markj@FreeBSD.org>
Closes openzfs#18136
lundman pushed a commit to openzfsonwindows/openzfs that referenced this pull request Feb 23, 2026
This option is removed upstream in favour of plain INVARIANTS.

VNASSERT is always defined so I see no reason to use it conditionally.

Reviewed-by: Brian Behlendorf <behlendorf1@llnl.gov>
Reviewed-by: Alexander Motin <alexander.motin@TrueNAS.com>
Signed-off-by: Mark Johnston <markj@FreeBSD.org>
Closes openzfs#18136
lundman pushed a commit to openzfsonwindows/openzfs that referenced this pull request Feb 23, 2026
This option is removed upstream in favour of plain INVARIANTS.

VNASSERT is always defined so I see no reason to use it conditionally.

Reviewed-by: Brian Behlendorf <behlendorf1@llnl.gov>
Reviewed-by: Alexander Motin <alexander.motin@TrueNAS.com>
Signed-off-by: Mark Johnston <markj@FreeBSD.org>
Closes openzfs#18136
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Status: Accepted Ready to integrate (reviewed, tested)

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants