]> git.proxmox.com Git - mirror_zfs.git/commit - include/sys/zvol_impl.h
zvol: make calls to platform ops static
authorChristian Schwarz <christian.schwarz@nutanix.com>
Mon, 7 Feb 2022 18:24:38 +0000 (19:24 +0100)
committerGitHub <noreply@github.com>
Mon, 7 Feb 2022 18:24:38 +0000 (10:24 -0800)
commit1dccfd7a38325151ae370c1cd5112a21e874f96d
tree5589da57f942c7b5ed149c4ed4470503bafc0cd4
parentf2c5bc150e609a78185ea63c84fce7718f56e28a
zvol: make calls to platform ops static

There's no need to make the platform ops dynamic dispatch.

This change replaces the dynamic dispatch with static calls to the
platform-specific functions.
To avoid name collisions, prefix all platform-specific functions
with `zvol_os_`.
I actually find `zvol_..._os` slightly nicer to read in the calling
code, but having it as a prefix is useful.

Advantage:
- easier jump-to-definition / grepping
- potential benefits to static analysis
- better legibility

Future work: also prefix remaining `static` functions in zvol_os.c.

Reviewed-by: Brian Behlendorf <behlendorf1@llnl.gov>
Signed-off-by: Christian Schwarz <christian.schwarz@nutanix.com>
Closes #12965
include/sys/zvol_impl.h
module/os/freebsd/zfs/zvol_os.c
module/os/linux/zfs/zvol_os.c
module/zfs/zvol.c