PMEMPOOL_FEATURE_DISABLE(3)
π pmempool_feature_query(), pmempool_feature_enable(), pmempool_feature_disable() β toggle or query pool set features β¨
okay bestie, welcome to the PMDK Programmer's Manual πΈ β this is the page about flipping pool set features on and off and checking what's up with them. three little functions, one big vibe. let's go π«Ά
β¨ SYNOPSIS β¨
#include <libpmempool.h>
int pmempool_feature_query(const char *path, enum pmempool_feature feature, unsigned flags);
int pmempool_feature_enable(const char *path, enum pmempool_feature feature, unsigned flags);
int pmempool_feature_disable(const char *path, enum pmempool_feature feature, unsigned flags);
π DESCRIPTION π
so the feature argument takes these values, and every single one of them matters, no skimming π
PMEMPOOL_FEAT_SINGLEHDRβ only the first part in each replica contains the pool part internal metadata. lowkey exclusive: this value can be used only withpmempool_feature_query(). it can not be enabled or disabled, periodt. for details seepoolset(5). πPMEMPOOL_FEAT_CKSUM_2Kβ only the first 2KiB of pool part internal metadata is checksummed. other features may depend on this one to store additional metadata in the otherwise unused second 2KiB part of a header. whenPMEMPOOL_FEAT_CKSUM_2Kis disabled, the whole 4KiB is checksummed. π₯PMEMPOOL_FEAT_SHUTDOWN_STATEβ enables an additional check performed during pool open which verifies pool consistency in the presence of dirty shutdown. β οΈPMEMPOOL_FEAT_CKSUM_2Khas to be enabled prior toPMEMPOOL_FEAT_SHUTDOWN_STATE, otherwise enablingPMEMPOOL_FEAT_SHUTDOWN_STATEwill fail. like, it will just not happen. order matters, bestie.PMEMPOOL_FEAT_CHECK_BAD_BLOCKSβ enables checking bad blocks performed during opening a pool and fixing bad blocks performed bypmempool-syncduring syncing a pool. for details seepmempool-feature(1). π
and now the three functions, each doing their own iconic thing:
pmempool_feature_query()checks state of feature in the pool set pointed bypath. πpmempool_feature_enable()enables feature in the pool set pointed bypath. πpmempool_feature_disable()disables feature in the pool set pointed bypath. π
π¦ COMPATIBILITY π¦
poolsets with features not defined in this document (e.g. enabled by the newer software version) are not supported. so if a newer version of the software turned something on that isn't written down here? yeah, that's a no from this page. π«
π DISCLAIMER π
pmempool_feature_query(),pmempool_feature_enable()andpmempool_feature_disable()are not fail safe. π¨
β RETURN VALUE β
- on success,
pmempool_feature_query()returns0if feature is disabled or1if it is enabled. on error, it returns-1and setserrnoaccordingly. π«Ά - on success,
pmempool_feature_enable()returns0. on error, it returns-1and setserrnoaccordingly. β¨ - on success,
pmempool_feature_disable()returns0. on error, it returns-1and setserrnoaccordingly. π - if non zero
flagsare provided,errnois set toEINVALand the function returns-1. π
πΈ SEE ALSO πΈ
poolset(5) and https://pmem.io π
okay that's the whole page, you ate it π stay iconic, bestie β this was the PMDK programmer's manual, dated 2025-07-24. mwah ππ¦π
π¦ where this page comes from
- fedora 43: libpmempool-devel 2.1.0-4.fc43 Β· BSD-3-Clause
- π the page's license: BSD-3-Clause
- Copyright 2018-2022, Intel Corporation
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms