Skip to content

Commit

Permalink
Do not retrieve hidden zpool properties
Browse files Browse the repository at this point in the history
zprop_iter provides an interface to iterate over all available
zpool properties. To iterate over hidden zpool properties,
show_all parameter should be set to true.

Recently, dedupcached property was added as part of fast dedup
support in ZFS. This property is quite expensive since it needs
to calculate the total size of dedup table loaded into the ARC.

This commit updates the show_all parameter passed to zprop_iter,
and sets it to False, since we don't want to retrieve the
dedupcached property. All other hidden zpool properties will
not be retrieved either as part of zprop_iter. These properties
include name, tname, maxblocksize, maxdnodesize, dedupditto and
dedupcached.

Signed-off-by: Umer Saleem <umersaleem75@gmail.com>
  • Loading branch information
usaleem-ix committed Dec 11, 2024
1 parent 184a004 commit 8c66fcc
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion libzfs.pyx
Original file line number Diff line number Diff line change
Expand Up @@ -3127,7 +3127,7 @@ cdef class ZFSPool(object):
result = {}

with nogil:
libzfs.zprop_iter(self.__iterate_props, <void*>proptypes, True, True, zfs.ZFS_TYPE_POOL)
libzfs.zprop_iter(self.__iterate_props, <void*>proptypes, False, True, zfs.ZFS_TYPE_POOL)

for x in proptypes:
prop = ZPoolProperty.__new__(ZPoolProperty)
Expand Down

0 comments on commit 8c66fcc

Please sign in to comment.