Skip to content

Commit

Permalink
ioctl try fix
Browse files Browse the repository at this point in the history
  • Loading branch information
kjeld Schouten-Lebbing committed Sep 29, 2020
1 parent 2f5ecd0 commit 9d138e9
Showing 1 changed file with 7 additions and 14 deletions.
21 changes: 7 additions & 14 deletions module/zfs/zfs_ioctl.c
Original file line number Diff line number Diff line change
Expand Up @@ -2453,15 +2453,17 @@ zfs_prop_set_special(const char *dsname, zprop_source_t source,
case ZFS_PROP_COMPRESSION:
if (intval == ZIO_COMPRESS_ADAPTIVE) {
err = dsl_dataset_activate_compress_adaptive(dsname);

if (err == 0)
err = -1;

}
err = dsl_dataset_set_compression(dsname, source, intval);
/*
* Set err to -1 to force the zfs_set_prop_nvlist code down the
* default path to set the value in the nvlist.
*/
if (err == 0)
err = -1;
break;
case ZFS_PROP_KEYLOCATION:
err = dsl_crypto_can_set_keylocation(dsname, strval);

/*
* Set err to -1 to force the zfs_set_prop_nvlist code down the
* default path to set the value in the nvlist.
Expand All @@ -2475,15 +2477,6 @@ zfs_prop_set_special(const char *dsname, zprop_source_t source,
case ZFS_PROP_REFRESERVATION:
err = dsl_dataset_set_refreservation(dsname, source, intval);
break;
case ZFS_PROP_COMPRESSION:
err = dsl_dataset_set_compression(dsname, source, intval);
/*
* Set err to -1 to force the zfs_set_prop_nvlist code down the
* default path to set the value in the nvlist.
*/
if (err == 0)
err = -1;
break;
case ZFS_PROP_VOLSIZE:
err = zvol_set_volsize(dsname, intval);
break;
Expand Down

0 comments on commit 9d138e9

Please sign in to comment.