Skip to content

ZVOL: Make zvol_prefetch_bytes module parameter platform-independent #17385

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 names between Linux and FreeBSD.

Description

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

How Has This Been Tested?

No additional tests added.

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:

@fuporovvStack fuporovvStack force-pushed the zvol-small-compatibility-fixes-zvol_prefetch_bytes branch from c1a5ca9 to 22736b4 Compare May 27, 2025 09:03
@amotin amotin added the Status: Code Review Needed Ready for review and testing label May 27, 2025
@fuporovvStack fuporovvStack force-pushed the zvol-small-compatibility-fixes-zvol_prefetch_bytes branch from 22736b4 to d34fa22 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.prefetch_bytes
vfs.zfs.vol.prefetch_bytes: 131072

Also, on Linux side:

$ cat /sys/module/zfs/parameters/zvol_prefetch_bytes 
131072

The module parameter now is represented in FreeBSD sysctls list
with name: 'vfs.zfs.vol.prefetch_bytes'. The default value is 131072,
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_prefetch_bytes branch from d34fa22 to 4a088ca Compare May 28, 2025 19:50
@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