diff options
author | mav <mav@FreeBSD.org> | 2016-03-21 00:20:49 +0000 |
---|---|---|
committer | mav <mav@FreeBSD.org> | 2016-03-21 00:20:49 +0000 |
commit | e34c027e2e21bb8122b138bc26bcc6099ef0f26a (patch) | |
tree | f14178a3733d40cf87ed202643c101a6ce6a2157 /sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zio_checksum.c | |
parent | ad9d624de4cc5fdb0533b2c1d1c8944ba615d9bc (diff) | |
download | FreeBSD-src-e34c027e2e21bb8122b138bc26bcc6099ef0f26a.zip FreeBSD-src-e34c027e2e21bb8122b138bc26bcc6099ef0f26a.tar.gz |
MFC r296523: MFV r296522:
6541 Pool feature-flag check defeated if "verify" is included in the dedup
property value
Reviewed by: Matthew Ahrens <mahrens@delphix.com>
Reviewed by: Richard Laager <rlaager@wiktel.com>
Approved by: Robert Mustacchi <rm@joyent.com>
Author: ilovezfs <ilovezfs@icloud.com>
illumos/illumos-gate@971640e6aa954c91b0706543741aa4570299f4d7
Diffstat (limited to 'sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zio_checksum.c')
-rw-r--r-- | sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zio_checksum.c | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zio_checksum.c b/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zio_checksum.c index 6ba64e0..dac118a 100644 --- a/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zio_checksum.c +++ b/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zio_checksum.c @@ -138,10 +138,16 @@ zio_checksum_info_t zio_checksum_table[ZIO_CHECKSUM_FUNCTIONS] = { #endif }; +/* + * The flag corresponding to the "verify" in dedup=[checksum,]verify + * must be cleared first, so callers should use ZIO_CHECKSUM_MASK. + */ spa_feature_t zio_checksum_to_feature(enum zio_checksum cksum) { #ifdef illumos + VERIFY((cksum & ~ZIO_CHECKSUM_MASK) == 0); + switch (cksum) { case ZIO_CHECKSUM_SHA512: return (SPA_FEATURE_SHA512); |