mirror of
https://git.proxmox.com/git/mirror_zfs.git
synced 2026-05-24 19:28:53 +03:00
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:
@@ -88,7 +88,7 @@ dsl_prop_get_dd(dsl_dir_t *dd, const char *propname,
|
||||
setpoint[0] = '\0';
|
||||
|
||||
prop = zfs_name_to_prop(propname);
|
||||
inheritable = (prop == ZPROP_INVAL || zfs_prop_inheritable(prop));
|
||||
inheritable = (prop == ZPROP_USERPROP || zfs_prop_inheritable(prop));
|
||||
inheritstr = kmem_asprintf("%s%s", propname, ZPROP_INHERIT_SUFFIX);
|
||||
recvdstr = kmem_asprintf("%s%s", propname, ZPROP_RECVD_SUFFIX);
|
||||
|
||||
@@ -168,7 +168,7 @@ dsl_prop_get_ds(dsl_dataset_t *ds, const char *propname,
|
||||
uint64_t zapobj;
|
||||
|
||||
ASSERT(dsl_pool_config_held(ds->ds_dir->dd_pool));
|
||||
inheritable = (prop == ZPROP_INVAL || zfs_prop_inheritable(prop));
|
||||
inheritable = (prop == ZPROP_USERPROP || zfs_prop_inheritable(prop));
|
||||
zapobj = dsl_dataset_phys(ds)->ds_props_obj;
|
||||
|
||||
if (zapobj != 0) {
|
||||
@@ -1055,12 +1055,12 @@ dsl_prop_get_all_impl(objset_t *mos, uint64_t propobj,
|
||||
prop = zfs_name_to_prop(propname);
|
||||
|
||||
/* Skip non-inheritable properties. */
|
||||
if ((flags & DSL_PROP_GET_INHERITING) && prop != ZPROP_INVAL &&
|
||||
!zfs_prop_inheritable(prop))
|
||||
if ((flags & DSL_PROP_GET_INHERITING) &&
|
||||
prop != ZPROP_USERPROP && !zfs_prop_inheritable(prop))
|
||||
continue;
|
||||
|
||||
/* Skip properties not valid for this type. */
|
||||
if ((flags & DSL_PROP_GET_SNAPSHOT) && prop != ZPROP_INVAL &&
|
||||
if ((flags & DSL_PROP_GET_SNAPSHOT) && prop != ZPROP_USERPROP &&
|
||||
!zfs_prop_valid_for_type(prop, ZFS_TYPE_SNAPSHOT, B_FALSE))
|
||||
continue;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user