diff options
author | Tom Caputi <[email protected]> | 2019-03-14 19:48:30 -0400 |
---|---|---|
committer | Brian Behlendorf <[email protected]> | 2019-03-14 16:48:30 -0700 |
commit | eaed840542b49b36fb8ed3a2aaf7208629974434 (patch) | |
tree | 63091c068eeda538d1e4dfefe8b907ce19547455 /module/zfs/dsl_crypt.c | |
parent | 98310e5d1aebda5a7cd986c8a0dc9932d62ead56 (diff) |
Better user experience for errata 4
This patch attempts to address some user concerns that have arisen
since errata 4 was introduced.
* The errata warning has been made less scary for users without
any encrypted datasets.
* The errata warning now clears itself without a pool reimport if
the bookmark_v2 feature is enabled and no encrypted datasets
exist.
* It is no longer possible to create new encrypted datasets without
enabling the bookmark_v2 feature, thus helping to ensure that the
errata is resolved.
Reviewed-by: Brian Behlendorf <[email protected]>
Signed-off-by: Tom Caputi <[email protected]>
Issue ##8308
Closes #8504
Diffstat (limited to 'module/zfs/dsl_crypt.c')
-rw-r--r-- | module/zfs/dsl_crypt.c | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/module/zfs/dsl_crypt.c b/module/zfs/dsl_crypt.c index a0e7fcce4..21db8e51f 100644 --- a/module/zfs/dsl_crypt.c +++ b/module/zfs/dsl_crypt.c @@ -1837,6 +1837,13 @@ dmu_objset_create_crypt_check(dsl_dir_t *parentdd, dsl_crypto_params_t *dcp, return (SET_ERROR(EOPNOTSUPP)); } + /* Check for errata #4 (encryption enabled, bookmark_v2 disabled) */ + if (parentdd != NULL && + !spa_feature_is_enabled(parentdd->dd_pool->dp_spa, + SPA_FEATURE_BOOKMARK_V2)) { + return (SET_ERROR(EOPNOTSUPP)); + } + /* handle inheritance */ if (dcp->cp_wkey == NULL) { ASSERT3P(parentdd, !=, NULL); |