Skip to content

ZVOL: Make zvol_prefetch_bytes module parameter platform-independent#17385

Merged
amotin merged 1 commit intoopenzfs:masterfrom
fuporovvStack:zvol-small-compatibility-fixes-zvol_prefetch_bytes
May 31, 2025
Merged

ZVOL: Make zvol_prefetch_bytes module parameter platform-independent#17385
amotin merged 1 commit intoopenzfs:masterfrom
fuporovvStack:zvol-small-compatibility-fixes-zvol_prefetch_bytes

Conversation

@fuporovvStack
Copy link
Copy Markdown
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
Copy Markdown
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

@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
@amotin
Copy link
Copy Markdown
Member

amotin commented May 29, 2025

@fuporovvStack This grown conflict after another PR merge. Please rebase.

Comment thread module/os/freebsd/zfs/zvol_os.c
@fuporovvStack fuporovvStack force-pushed the zvol-small-compatibility-fixes-zvol_prefetch_bytes branch 2 times, most recently from 5b5271f to 121ef20 Compare May 30, 2025 15:45
@github-actions github-actions Bot removed the Status: Accepted Ready to integrate (reviewed, tested) label May 30, 2025
@behlendorf behlendorf added the Status: Accepted Ready to integrate (reviewed, tested) label May 30, 2025
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 <fuporov.vstack@gmail.com>
@fuporovvStack fuporovvStack force-pushed the zvol-small-compatibility-fixes-zvol_prefetch_bytes branch from 121ef20 to d041545 Compare May 31, 2025 04:40
@github-actions github-actions Bot removed the Status: Accepted Ready to integrate (reviewed, tested) label May 31, 2025
@amotin amotin added the Status: Accepted Ready to integrate (reviewed, tested) label May 31, 2025
@amotin amotin merged commit e1677d9 into openzfs:master May 31, 2025
21 of 23 checks passed
spauka pushed a commit to spauka/zfs that referenced this pull request Aug 30, 2025
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.
Reviewed-by: Brian Behlendorf <behlendorf1@llnl.gov>
Reviewed-by: Alexander Motin <mav@FreeBSD.org>
Reviewed-by: Rob Norris <rob.norris@klarasystems.com>
Signed-off-by: Fedor Uporov <fuporov.vstack@gmail.com>
Closes openzfs#17385
lundman pushed a commit to openzfsonosx/openzfs-fork that referenced this pull request Jan 28, 2026
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.
Reviewed-by: Brian Behlendorf <behlendorf1@llnl.gov>
Reviewed-by: Alexander Motin <mav@FreeBSD.org>
Reviewed-by: Rob Norris <rob.norris@klarasystems.com>
Signed-off-by: Fedor Uporov <fuporov.vstack@gmail.com>
Closes openzfs#17385
lundman pushed a commit to openzfsonwindows/openzfs that referenced this pull request Feb 16, 2026
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.
Reviewed-by: Brian Behlendorf <behlendorf1@llnl.gov>
Reviewed-by: Alexander Motin <mav@FreeBSD.org>
Reviewed-by: Rob Norris <rob.norris@klarasystems.com>
Signed-off-by: Fedor Uporov <fuporov.vstack@gmail.com>
Closes openzfs#17385
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