Disable EDONR on FreeBSD
FreeBSD uses its own crypto framework in-kernel which, at this time, has no EDONR implementation. Reviewed-by: Jorgen Lundman <lundman@lundman.net> Reviewed-by: Allan Jude <allanjude@freebsd.org> Reviewed-by: Brian Behlendorf <behlendorf1@llnl.gov> Signed-off-by: Matt Macy <mmacy@FreeBSD.org> Signed-off-by: Ryan Moeller <ryan@ixsystems.com> Closes #9664
This commit is contained in:
parent
054a049841
commit
f95704ca5e
|
@ -85,7 +85,9 @@ enum zio_checksum {
|
|||
ZIO_CHECKSUM_NOPARITY,
|
||||
ZIO_CHECKSUM_SHA512,
|
||||
ZIO_CHECKSUM_SKEIN,
|
||||
#if !defined(__FreeBSD__)
|
||||
ZIO_CHECKSUM_EDONR,
|
||||
#endif
|
||||
ZIO_CHECKSUM_FUNCTIONS
|
||||
};
|
||||
|
||||
|
|
|
@ -56,7 +56,9 @@ typedef enum spa_feature {
|
|||
SPA_FEATURE_LARGE_DNODE,
|
||||
SPA_FEATURE_SHA512,
|
||||
SPA_FEATURE_SKEIN,
|
||||
#if !defined(__FreeBSD__)
|
||||
SPA_FEATURE_EDONR,
|
||||
#endif
|
||||
SPA_FEATURE_USEROBJ_ACCOUNTING,
|
||||
SPA_FEATURE_ENCRYPTION,
|
||||
SPA_FEATURE_PROJECT_QUOTA,
|
||||
|
|
|
@ -313,6 +313,8 @@ ever had their checksum set to \fBedonr\fR are destroyed.
|
|||
|
||||
The \fBedonr\fR feature is not supported by GRUB and must not be used on
|
||||
the pool if GRUB needs to access the pool (e.g. for /boot).
|
||||
|
||||
FreeBSD does not support the \fBedonr\fR feature.
|
||||
.RE
|
||||
|
||||
.sp
|
||||
|
|
|
@ -705,6 +705,9 @@ and
|
|||
checksum algorithms require enabling the appropriate features on the pool.
|
||||
These pool features are not supported by GRUB and must not be used on the
|
||||
pool if GRUB needs to access the pool (e.g. for /boot).
|
||||
FreeBSD does not support the
|
||||
.Sy edonr
|
||||
algorithm.
|
||||
.Pp
|
||||
Please see
|
||||
.Xr zpool-features 5
|
||||
|
|
|
@ -421,6 +421,8 @@ zpool_feature_init(void)
|
|||
skein_deps);
|
||||
}
|
||||
|
||||
#if !defined(__FreeBSD__)
|
||||
|
||||
{
|
||||
static const spa_feature_t edonr_deps[] = {
|
||||
SPA_FEATURE_EXTENSIBLE_DATASET,
|
||||
|
@ -432,6 +434,7 @@ zpool_feature_init(void)
|
|||
ZFEATURE_FLAG_PER_DATASET, ZFEATURE_TYPE_BOOLEAN,
|
||||
edonr_deps);
|
||||
}
|
||||
#endif
|
||||
|
||||
{
|
||||
static const spa_feature_t redact_books_deps[] = {
|
||||
|
|
|
@ -81,7 +81,10 @@ zfs_prop_init(void)
|
|||
{ "noparity", ZIO_CHECKSUM_NOPARITY },
|
||||
{ "sha512", ZIO_CHECKSUM_SHA512 },
|
||||
{ "skein", ZIO_CHECKSUM_SKEIN },
|
||||
#if !defined(__FreeBSD__)
|
||||
|
||||
{ "edonr", ZIO_CHECKSUM_EDONR },
|
||||
#endif
|
||||
{ NULL }
|
||||
};
|
||||
|
||||
|
@ -98,8 +101,11 @@ zfs_prop_init(void)
|
|||
{ "skein", ZIO_CHECKSUM_SKEIN },
|
||||
{ "skein,verify",
|
||||
ZIO_CHECKSUM_SKEIN | ZIO_CHECKSUM_VERIFY },
|
||||
#if !defined(__FreeBSD__)
|
||||
|
||||
{ "edonr,verify",
|
||||
ZIO_CHECKSUM_EDONR | ZIO_CHECKSUM_VERIFY },
|
||||
#endif
|
||||
{ NULL }
|
||||
};
|
||||
|
||||
|
@ -297,12 +303,22 @@ zfs_prop_init(void)
|
|||
zprop_register_index(ZFS_PROP_CHECKSUM, "checksum",
|
||||
ZIO_CHECKSUM_DEFAULT, PROP_INHERIT, ZFS_TYPE_FILESYSTEM |
|
||||
ZFS_TYPE_VOLUME,
|
||||
"on | off | fletcher2 | fletcher4 | sha256 | sha512 | "
|
||||
"skein | edonr", "CHECKSUM", checksum_table);
|
||||
#if !defined(__FreeBSD__)
|
||||
"on | off | fletcher2 | fletcher4 | sha256 | sha512 | skein"
|
||||
" | edonr",
|
||||
#else
|
||||
"on | off | fletcher2 | fletcher4 | sha256 | sha512 | skein",
|
||||
#endif
|
||||
"CHECKSUM", checksum_table);
|
||||
zprop_register_index(ZFS_PROP_DEDUP, "dedup", ZIO_CHECKSUM_OFF,
|
||||
PROP_INHERIT, ZFS_TYPE_FILESYSTEM | ZFS_TYPE_VOLUME,
|
||||
"on | off | verify | sha256[,verify], sha512[,verify], "
|
||||
"skein[,verify], edonr,verify", "DEDUP", dedup_table);
|
||||
#if !defined(__FreeBSD__)
|
||||
"skein[,verify], edonr,verify",
|
||||
#else
|
||||
"skein[,verify]",
|
||||
#endif
|
||||
"DEDUP", dedup_table);
|
||||
zprop_register_index(ZFS_PROP_COMPRESSION, "compression",
|
||||
ZIO_COMPRESS_DEFAULT, PROP_INHERIT,
|
||||
ZFS_TYPE_FILESYSTEM | ZFS_TYPE_VOLUME,
|
||||
|
|
|
@ -191,10 +191,12 @@ zio_checksum_info_t zio_checksum_table[ZIO_CHECKSUM_FUNCTIONS] = {
|
|||
abd_checksum_skein_tmpl_init, abd_checksum_skein_tmpl_free,
|
||||
ZCHECKSUM_FLAG_METADATA | ZCHECKSUM_FLAG_DEDUP |
|
||||
ZCHECKSUM_FLAG_SALTED | ZCHECKSUM_FLAG_NOPWRITE, "skein"},
|
||||
#if !defined(__FreeBSD__)
|
||||
{{abd_checksum_edonr_native, abd_checksum_edonr_byteswap},
|
||||
abd_checksum_edonr_tmpl_init, abd_checksum_edonr_tmpl_free,
|
||||
ZCHECKSUM_FLAG_METADATA | ZCHECKSUM_FLAG_SALTED |
|
||||
ZCHECKSUM_FLAG_NOPWRITE, "edonr"},
|
||||
#endif
|
||||
};
|
||||
|
||||
/*
|
||||
|
@ -211,8 +213,10 @@ zio_checksum_to_feature(enum zio_checksum cksum)
|
|||
return (SPA_FEATURE_SHA512);
|
||||
case ZIO_CHECKSUM_SKEIN:
|
||||
return (SPA_FEATURE_SKEIN);
|
||||
#if !defined(__FreeBSD__)
|
||||
case ZIO_CHECKSUM_EDONR:
|
||||
return (SPA_FEATURE_EDONR);
|
||||
#endif
|
||||
default:
|
||||
return (SPA_FEATURE_NONE);
|
||||
}
|
||||
|
|
|
@ -84,8 +84,7 @@ tests = ['tst.destroy_fs', 'tst.destroy_snap', 'tst.get_count_and_limit',
|
|||
tags = ['functional', 'channel_program', 'synctask_core']
|
||||
|
||||
[tests/functional/checksum]
|
||||
tests = ['run_edonr_test', 'run_sha2_test', 'run_skein_test',
|
||||
'filetest_001_pos']
|
||||
tests = ['run_sha2_test', 'run_skein_test', 'filetest_001_pos']
|
||||
tags = ['functional', 'checksum']
|
||||
|
||||
[tests/functional/clean_mirror]
|
||||
|
|
|
@ -37,6 +37,10 @@ tags = ['functional', 'atime']
|
|||
tests = ['chattr_001_pos', 'chattr_002_neg']
|
||||
tags = ['functional', 'chattr']
|
||||
|
||||
[tests/functional/checksum:Linux]
|
||||
tests = ['run_edonr_test']
|
||||
tags = ['functional', 'checksum']
|
||||
|
||||
[tests/functional/cli_root/zfs:Linux]
|
||||
tests = ['zfs_003_neg']
|
||||
tags = ['functional', 'cli_root', 'zfs']
|
||||
|
|
|
@ -21,10 +21,13 @@ dist_pkgdata_DATA = \
|
|||
pkgexecdir = $(datadir)/@PACKAGE@/zfs-tests/tests/functional/checksum
|
||||
|
||||
pkgexec_PROGRAMS = \
|
||||
edonr_test \
|
||||
skein_test \
|
||||
sha2_test
|
||||
|
||||
edonr_test_SOURCES = edonr_test.c
|
||||
skein_test_SOURCES = skein_test.c
|
||||
sha2_test_SOURCES = sha2_test.c
|
||||
|
||||
if BUILD_LINUX
|
||||
pkgexec_PROGRAMS += edonr_test
|
||||
edonr_test_SOURCES = edonr_test.c
|
||||
endif
|
||||
|
|
Loading…
Reference in New Issue