Replace ZPROP_INVAL with ZPROP_USERPROP where it means a user property

Reviewed-by: Brian Behlendorf <behlendorf1@llnl.gov>
Signed-off-by: Allan Jude <allan@klarasystems.com>
Sponsored-by: Klara Inc.
Closes #12676
This commit is contained in:
Allan Jude
2022-06-14 14:27:53 -04:00
committed by GitHub
parent 9e605cf155
commit 4ff7a8fa2f
12 changed files with 49 additions and 46 deletions
+3 -3
View File
@@ -5496,7 +5496,7 @@ vdev_props_set_sync(void *arg, dmu_tx_t *tx)
}
switch (prop = vdev_name_to_prop(propname)) {
case VDEV_PROP_USER:
case VDEV_PROP_USERPROP:
if (vdev_prop_user(propname)) {
strval = fnvpair_value_string(elem);
if (strlen(strval) == 0) {
@@ -5580,7 +5580,7 @@ vdev_prop_set(vdev_t *vd, nvlist_t *innvl, nvlist_t *outnvl)
uint64_t intval = 0;
char *strval = NULL;
if (prop == VDEV_PROP_USER && !vdev_prop_user(propname)) {
if (prop == VDEV_PROP_USERPROP && !vdev_prop_user(propname)) {
error = EINVAL;
goto end;
}
@@ -5937,7 +5937,7 @@ vdev_prop_get(vdev_t *vd, nvlist_t *innvl, nvlist_t *outnvl)
case VDEV_PROP_COMMENT:
/* Exists in the ZAP below */
/* FALLTHRU */
case VDEV_PROP_USER:
case VDEV_PROP_USERPROP:
/* User Properites */
src = ZPROP_SRC_LOCAL;