Skip to content
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

Fix readonly check for vdev user properties #16890

Merged
merged 1 commit into from
Dec 20, 2024
Merged

Conversation

amotin
Copy link
Member

@amotin amotin commented Dec 19, 2024

VDEV_PROP_USERPROP is equal do VDEV_PROP_INVAL and so is not a real property. That's why vdev_prop_readonly() does not work right for it. In particular it may declare all vdev user properties readonly on FreeBSD.

How Has This Been Tested?

Before:

# zpool set cool:pool=goodbye hdd da0p2
cannot set property cool:pool for da0p2 on hdd: pool is read-only

After:

# zpool set cool:pool=goodbye hdd da0p2
# zpool get cool:pool hdd da0p2
NAME        PROPERTY   VALUE      SOURCE
da0p2       cool:pool  goodbye    local

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)
  • 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:

VDEV_PROP_USERPROP is equal do VDEV_PROP_INVAL and so is not a real
property.  That's why vdev_prop_readonly() does not work right for
it.  In particular it may declare all vdev user properties readonly
on FreeBSD.

Signed-off-by:	Alexander Motin <mav@FreeBSD.org>
Sponsored by:	iXsystems, Inc.
@amotin amotin added the Status: Code Review Needed Ready for review and testing label Dec 19, 2024
@amotin amotin requested a review from robn December 19, 2024 17:00
@amotin amotin requested a review from allanjude December 19, 2024 17:03
@robn
Copy link
Member

robn commented Dec 19, 2024

Looks right. Added to #16887 for the test suite run.

@behlendorf behlendorf added Status: Accepted Ready to integrate (reviewed, tested) and removed Status: Code Review Needed Ready for review and testing labels Dec 20, 2024
@amotin amotin merged commit 1acd246 into openzfs:master Dec 20, 2024
25 of 26 checks passed
@amotin amotin deleted the vdev_prop branch December 20, 2024 22:25
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