Skip to content

ZVOL: Return early, if volmode is ZFS_VOLMODE_NONE on FreeBSD side#17405

Merged
behlendorf merged 1 commit intoopenzfs:masterfrom
fuporovvStack:zvol-small-compatibility-fixes-return-create-minor-early
Jul 30, 2025
Merged

ZVOL: Return early, if volmode is ZFS_VOLMODE_NONE on FreeBSD side#17405
behlendorf merged 1 commit intoopenzfs:masterfrom
fuporovvStack:zvol-small-compatibility-fixes-return-create-minor-early

Conversation

@fuporovvStack
Copy link
Copy Markdown
Contributor

Motivation and Context

Return early, if volmode is ZFS_VOLMODE_NONE on FreeBSD side

Description

Return from zvol_os_create_minor() function immediatly after dsl_prop_get_integer() call if volmode property value is 'none',
like it is doing on Linux side. The error value EAGAIN is returned in this case on both platforms.

How Has This Been Tested?

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:

Comment thread module/os/freebsd/zfs/zvol_os.c Outdated
Comment thread module/os/freebsd/zfs/zvol_os.c
@behlendorf behlendorf added the Status: Code Review Needed Ready for review and testing label May 30, 2025
@amotin amotin added the Status: Revision Needed Changes are required for the PR to be accepted label Jun 19, 2025
@fuporovvStack fuporovvStack force-pushed the zvol-small-compatibility-fixes-return-create-minor-early branch from b0a712a to fba3938 Compare June 24, 2025 07:30
@fuporovvStack
Copy link
Copy Markdown
Contributor Author

I've apdated the PR according your suggestions, if I got it clearly. Also, as alternative, opened another PR, where zvol_alloc() function is implemented, like it is done on Linux side:
#17482

@amotin amotin removed the Status: Revision Needed Changes are required for the PR to be accepted label Jun 24, 2025
Return from zvol_os_create_minor() function immediatly after
dsl_prop_get_integer() call if volmode property value is set to
'none', like it is doing on Linux side.

Sponsored-by: vStack, Inc.
Signed-off-by: Fedor Uporov <fuporov.vstack@gmail.com>
@behlendorf behlendorf force-pushed the zvol-small-compatibility-fixes-return-create-minor-early branch from fba3938 to 6217195 Compare July 30, 2025 01:57
@behlendorf behlendorf added Status: Accepted Ready to integrate (reviewed, tested) and removed Status: Code Review Needed Ready for review and testing labels Jul 30, 2025
@behlendorf behlendorf merged commit dea0fc9 into openzfs:master Jul 30, 2025
25 checks passed
spauka pushed a commit to spauka/zfs that referenced this pull request Aug 30, 2025
Return from zvol_os_create_minor() function immediately after
dsl_prop_get_integer() call if volmode property value is set to
'none', like it is doing on Linux side.

Sponsored-by: vStack, Inc.
Reviewed-by: Brian Behlendorf <behlendorf1@llnl.gov>
Reviewed-by: Alexander Motin <alexander.motin@TrueNAS.com>
Signed-off-by: Fedor Uporov <fuporov.vstack@gmail.com>
Closes openzfs#17405
lundman pushed a commit to openzfsonosx/openzfs-fork that referenced this pull request Jan 30, 2026
Return from zvol_os_create_minor() function immediately after
dsl_prop_get_integer() call if volmode property value is set to
'none', like it is doing on Linux side.

Sponsored-by: vStack, Inc.
Reviewed-by: Brian Behlendorf <behlendorf1@llnl.gov>
Reviewed-by: Alexander Motin <alexander.motin@TrueNAS.com>
Signed-off-by: Fedor Uporov <fuporov.vstack@gmail.com>
Closes openzfs#17405
lundman pushed a commit to openzfsonwindows/openzfs that referenced this pull request Feb 23, 2026
Return from zvol_os_create_minor() function immediately after
dsl_prop_get_integer() call if volmode property value is set to
'none', like it is doing on Linux side.

Sponsored-by: vStack, Inc.
Reviewed-by: Brian Behlendorf <behlendorf1@llnl.gov>
Reviewed-by: Alexander Motin <alexander.motin@TrueNAS.com>
Signed-off-by: Fedor Uporov <fuporov.vstack@gmail.com>
Closes openzfs#17405
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.

3 participants