Skip to content

Commit

Permalink
Fix readonly check for vdev user properties
Browse files Browse the repository at this point in the history
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.

Reviewed-by: Brian Behlendorf <[email protected]>
Reviewed-by: Rob Norris <[email protected]>
Signed-off-by:	Alexander Motin <[email protected]>
Sponsored by:	iXsystems, Inc.
Closes openzfs#16890
  • Loading branch information
amotin authored and behlendorf committed Dec 29, 2024
1 parent cb8da70 commit f9b02fe
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion module/zfs/vdev.c
Original file line number Diff line number Diff line change
Expand Up @@ -5969,7 +5969,7 @@ vdev_prop_set(vdev_t *vd, nvlist_t *innvl, nvlist_t *outnvl)
goto end;
}

if (vdev_prop_readonly(prop)) {
if (prop != VDEV_PROP_USERPROP && vdev_prop_readonly(prop)) {
error = EROFS;
goto end;
}
Expand Down

0 comments on commit f9b02fe

Please sign in to comment.