Skip to content

ZVOL: Make zvol_inhibit_dev module parameter platform-independent #17384

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

fuporovvStack
Copy link
Contributor

Motivation and Context

Unify ZFS kernel module parameters between Linux and FreeBSD.

Description

The zvol_inhibit_dev module parameter now is represented in FreeBSD sysctls list with name: 'vfs.zfs.zvol_inhibit_dev'. The default value is '0', same as on Linux side.

How Has This Been Tested?

The zvol_misc_volmode.ksh testcase was modified to be fully compatible between Linux and FreeBSD.

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:

@amotin amotin added the Status: Code Review Needed Ready for review and testing label May 27, 2025
Copy link
Member

@robn robn left a comment

Choose a reason for hiding this comment

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

Thanks for doing this (and the other two); they've been on my long list of stuff to jfdi for ages.

The module parameter now is represented in FreeBSD sysctls list with
name: 'vfs.zfs.vol.inhibit_dev'. The default value is '0', same as on
Linux side.

Sponsored-by: vStack, Inc.
Signed-off-by: Fedor Uporov <[email protected]>
@fuporovvStack fuporovvStack force-pushed the zvol-small-compatibility-fixes-zvol_inhibit_dev branch from 0d2fdf0 to 63a98aa Compare May 28, 2025 19:29
@fuporovvStack
Copy link
Contributor Author

Make sysctl name more compatible to zvol sysctls subgroup on FreeBSD side.
Now it looks like:

$ sysctl vfs.zfs.vol.inhibit_dev
vfs.zfs.vol.inhibit_dev: 0

Also, on Linux side:

$ cat /sys/module/zfs/parameters/zvol_inhibit_dev 
0

@behlendorf behlendorf added Status: Accepted Ready to integrate (reviewed, tested) and removed Status: Code Review Needed Ready for review and testing labels May 29, 2025
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