Skip to content

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

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

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:

@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
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 <[email protected]>
@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
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
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Status: Code Review Needed Ready for review and testing
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants