Pool feature-flag check defeated if "verify" is included in the dedup property value
zfs_check_settable() is not quite doing its job when checking for required spa feature flags in the case of the new cryptographic checksums whenever "verify" is also specified in the requested dedup setting.
zio_checksum_to_feature() expects a zio_checksum enum not a raw property intval, so the new checksums aren't being detected when ZIO_CHECKSUM_VERIFY gets in the way.
Given a pool without feature@sha512,
zfs create -o dedup=sha512 naughty/fivetwelve_noverify_ds
fails as expected since the raw intval is indeed equal to SPA_FEATURE_SHA512.
zfs create -o dedup=sha512,verify naughty/fivetwelve_verify_ds
incorrectly succeeds because ZIO_CHECKSUM_VERIFY is in the way, the raw intval is not a member of the enum, and zio_checksum_to_feature() returns SPA_FEATURE_NONE, with the result
that spa_feature_is_enabled() is never called.
This was first detected with edonr, since in that case verify is required.
Updated by ilove zfs about 5 years ago
Additional investigation shows that this does indeed cause panic (screenshot attached) on OmniOS (Bloody release, r151017, omnios-2e8c0ba, OmniOS_Text_bloody_20151211.iso), as soon as you actually start to add some data to the dataset.
zpool create -d planned c2t1d0
zfs create -o dedup=edonr,verify planned/demise
echo good > /panned/demise/bye.txt
panic: assertition failed: feature_get_refcount(spa, feature, &refcount) != 48 (0x30 != 0x30), file: ../../common/fs/zfs/zfeature.c, line: 390
Updated by Electric Monk almost 5 years ago
- Status changed from New to Closed
- % Done changed from 0 to 100
commit 971640e6aa954c91b0706543741aa4570299f4d7 Author: ilovezfs <firstname.lastname@example.org> Date: 2016-02-11T18:22:04.000Z 6541 Pool feature-flag check defeated if "verify" is included in the dedup property value Reviewed by: Matthew Ahrens <email@example.com> Reviewed by: Richard Laager <firstname.lastname@example.org> Approved by: Robert Mustacchi <email@example.com>