OpenZFS 6585 - sha512, skein, and edonr have an unenforced dependency on extensible dataset

Authored by: ilovezfs <ilovezfs@icloud.com>
Reviewed by: Matthew Ahrens <mahrens@delphix.com>
Reviewed by: Richard Laager <rlaager@wiktel.com>
Approved by: Robert Mustacchi <rm@joyent.com>
Ported by: Tony Hutter <hutter2@llnl.gov>

In any pool without the extensible dataset feature flag already enabled,
creating a dataset with dedup set to use one of the new checksums would
result in the following panic as soon as any data was added:

panic[cpu0]/thread=ffffff0006761c40: feature_get_refcount(spa, feature,
&refcount) != 48 (0x30 != 0x30), file: ../../common/fs/zfs/zfeature.c
line 390

Inpsection showed that feature->fi_feature was 7, which is the value of
SPA_FEATURE_EXTENSIBLE_DATASET in the spa_feature enum.  This commit
adds extensible dataset as a dependency for the sha512, edonr, and skein
feature flags, which prevents the panic.

OpenZFS-issue: https://www.illumos.org/issues/6585
OpenZFS-commit: https://github.com/illumos/illumos-gate/commit/892586e8a147c02d7f4053cc405229a13e796928
Porting Notes:
This code was originally from Illumos, but I actually ported it from:
openzfsonosx/zfs@b62a652
This commit is contained in:
ilovezfs
2016-01-28 04:51:19 -08:00
committed by Tony Hutter
parent 4a2e9a17d5
commit 125a406e24
2 changed files with 26 additions and 6 deletions
+3 -3
View File
@@ -464,7 +464,7 @@ improving performance by avoiding the use of spill blocks.
l l .
GUID org.illumos:sha512
READ\-ONLY COMPATIBLE no
DEPENDENCIES none
DEPENDENCIES extensible_dataset
.TE
This feature enables the use of the SHA-512/256 truncated hash algorithm
@@ -497,7 +497,7 @@ the updated GRUB stage2 module is installed).
l l .
GUID org.illumos:skein
READ\-ONLY COMPATIBLE no
DEPENDENCIES none
DEPENDENCIES extensible_dataset
.TE
This feature enables the use of the Skein hash algorithm for checksum
@@ -533,7 +533,7 @@ error.
l l .
GUID org.illumos:edonr
READ\-ONLY COMPATIBLE no
DEPENDENCIES none
DEPENDENCIES extensible_dataset
.TE
This feature enables the use of the Edon-R hash algorithm for checksum,