From e9768dbc44c7a49937ff3356d434f231c09fb925 Mon Sep 17 00:00:00 2001 From: themylogin Date: Thu, 5 Sep 2024 12:00:21 +0200 Subject: [PATCH] Ignore `fast_dedup` feature --- libzfs.pyx | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/libzfs.pyx b/libzfs.pyx index 592f56f..632188e 100644 --- a/libzfs.pyx +++ b/libzfs.pyx @@ -22,6 +22,7 @@ import errno as py_errno import urllib.parse GLOBAL_CONTEXT_LOCK = threading.Lock() +IGNORED_FEATURES = {'fast_dedup'} logger = logging.getLogger(__name__) @@ -1540,6 +1541,10 @@ cdef class ZFS(object): opts = opts.copy() for i in range(0, zfs.SPA_FEATURES): feat = &zfs.spa_feature_table[i] + + if feat.fi_uname in IGNORED_FEATURES: + continue + opts['feature@{}'.format(feat.fi_uname)] = 'enabled' copts = NVList(otherdict=opts) @@ -3151,6 +3156,10 @@ cdef class ZFSPool(object): for i in range(0, zfs.SPA_FEATURES): feat = &zfs.spa_feature_table[i] + + if i.fi_uname in IGNORED_FEATURES: + continue + f = ZPoolFeature.__new__(ZPoolFeature) f.feature = feat f.pool = self