Skip to content

Commit

Permalink
Ignore fast_dedup feature
Browse files Browse the repository at this point in the history
  • Loading branch information
themylogin committed Sep 5, 2024
1 parent d8cf036 commit 8bb71c0
Showing 1 changed file with 14 additions and 3 deletions.
17 changes: 14 additions & 3 deletions libzfs.pyx
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,18 @@ include "config.pxi"
include "nvpair.pxi"
include "converter.pxi"

IGNORED_FEATURES = {'fast_dedup'}


def all_features():
for i in range(0, zfs.SPA_FEATURES):
feat = &zfs.spa_feature_table[i]

if feat.fi_uname in IGNORED_FEATURES:
continue

yield feat


class DatasetType(enum.IntEnum):
FILESYSTEM = zfs.ZFS_TYPE_FILESYSTEM
Expand Down Expand Up @@ -1538,7 +1550,7 @@ cdef class ZFS(object):

if enable_all_feat:
opts = opts.copy()
for i in range(0, zfs.SPA_FEATURES):
for feat in all_features():
feat = &zfs.spa_feature_table[i]
opts['feature@{}'.format(feat.fi_uname)] = 'enabled'

Expand Down Expand Up @@ -3149,8 +3161,7 @@ cdef class ZFSPool(object):

features_nv = NVList(nvl)

for i in range(0, zfs.SPA_FEATURES):
feat = &zfs.spa_feature_table[i]
for feat in all_features():
f = ZPoolFeature.__new__(ZPoolFeature)
f.feature = feat
f.pool = self
Expand Down

0 comments on commit 8bb71c0

Please sign in to comment.