Skip to content

Commit 1acd246

Browse files
authored
Fix readonly check for vdev user properties
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
1 parent 219a89c commit 1acd246

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

module/zfs/vdev.c

+1-1
Original file line numberDiff line numberDiff line change
@@ -5969,7 +5969,7 @@ vdev_prop_set(vdev_t *vd, nvlist_t *innvl, nvlist_t *outnvl)
59695969
goto end;
59705970
}
59715971

5972-
if (vdev_prop_readonly(prop)) {
5972+
if (prop != VDEV_PROP_USERPROP && vdev_prop_readonly(prop)) {
59735973
error = EROFS;
59745974
goto end;
59755975
}

0 commit comments

Comments
 (0)