Date: Mon, 21 Mar 2016 00:20:49 +0000 (UTC) From: Alexander Motin <mav@FreeBSD.org> To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r297114 - stable/10/sys/cddl/contrib/opensolaris/uts/common/fs/zfs Message-ID: <201603210020.u2L0KneD035492@repo.freebsd.org>
next in thread | raw e-mail | index | archive | help
Author: mav Date: Mon Mar 21 00:20:49 2016 New Revision: 297114 URL: https://svnweb.freebsd.org/changeset/base/297114 Log: 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 Modified: stable/10/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zfs_ioctl.c stable/10/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zio_checksum.c Directory Properties: stable/10/ (props changed) Modified: stable/10/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zfs_ioctl.c ============================================================================== --- stable/10/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zfs_ioctl.c Mon Mar 21 00:19:42 2016 (r297113) +++ stable/10/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zfs_ioctl.c Mon Mar 21 00:20:49 2016 (r297114) @@ -3972,7 +3972,7 @@ zfs_check_settable(const char *dsname, n return (SET_ERROR(EINVAL)); /* check prop value is enabled in features */ - feature = zio_checksum_to_feature(intval); + feature = zio_checksum_to_feature(intval & ZIO_CHECKSUM_MASK); if (feature == SPA_FEATURE_NONE) break; Modified: stable/10/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zio_checksum.c ============================================================================== --- stable/10/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zio_checksum.c Mon Mar 21 00:19:42 2016 (r297113) +++ stable/10/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zio_checksum.c Mon Mar 21 00:20:49 2016 (r297114) @@ -138,10 +138,16 @@ zio_checksum_info_t zio_checksum_table[Z #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);
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201603210020.u2L0KneD035492>