.\" Automatically generated by Pandoc 2.0.6 .\" .TH "PMEMPOOL_FEATURE_QUERY" "3" "2022-08-25" "PMDK - pmempool API version 1.3" "PMDK Programmer's Manual" .hy .\" SPDX-License-Identifier: BSD-3-Clause .\" Copyright 2018, Intel Corporation .SH NAME .PP \f[B]pmempool_feature_query\f[](), \f[B]pmempool_feature_enable\f[](), \f[B]pmempool_feature_disable\f[]() \- toggle or query pool set features .SH SYNOPSIS .IP .nf \f[C] #include\ 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); \f[] .fi .SH DESCRIPTION .PP The \f[I]feature\f[] argument accepts following values: .IP \[bu] 2 \f[B]PMEMPOOL_FEAT_SINGLEHDR\f[] \- only the first part in each replica contains the pool part internal metadata. This value can be used only with \f[B]pmempool_feature_query\f[](). It can not be enabled or disabled. For details see \f[B]poolset\f[](5). .IP \[bu] 2 \f[B]PMEMPOOL_FEAT_CKSUM_2K\f[] \- only the first 2KiB of pool part internal metadata is checksummed. Other features may depend on this one to store additional metadata in otherwise unused second 2KiB part of a header. When \f[B]PMEMPOOL_FEAT_CKSUM_2K\f[] is disabled whole 4KiB is checksummed. .IP \[bu] 2 \f[B]PMEMPOOL_FEAT_SHUTDOWN_STATE\f[] \- enables additional check performed during pool open which verifies pool consistency in the presence of dirty shutdown. \f[B]PMEMPOOL_FEAT_CKSUM_2K\f[] has to be enabled prior to \f[B]PMEMPOOL_FEAT_SHUTDOWN_STATE\f[] otherwise enabling \f[B]PMEMPOOL_FEAT_SHUTDOWN_STATE\f[] will fail. .IP \[bu] 2 \f[B]PMEMPOOL_FEAT_CHECK_BAD_BLOCKS\f[] \- enables checking bad blocks performed during opening a pool and fixing bad blocks performed by pmempool\-sync during syncing a pool. For details see \f[B]pmempool\-feature\f[](1). .PP The \f[B]pmempool_feature_query\f[]() function checks state of \f[I]feature\f[] in the pool set pointed by \f[I]path\f[]. .PP The \f[B]pmempool_feature_enable\f[]() function enables \f[I]feature\f[] in the pool set pointed by \f[I]path\f[]. .PP The \f[B]pmempool_feature_disable\f[]() function disables \f[I]feature\f[] in the pool set pointed by \f[I]path\f[]. .SH COMPATIBILITY .PP Poolsets with features not defined in this document (e.g.\ enabled by the newer software version) are not supported. .SH DISCLAIMER .PP \f[B]pmempool_feature_query\f[](), \f[B]pmempool_feature_enable\f[]() and \f[B]pmempool_feature_disable\f[]() are not fail safe. .SH RETURN VALUE .PP On success, \f[B]pmempool_feature_query\f[]() returns 0 if \f[I]feature\f[] is disabled or 1 if it is enabled. On error, it returns \-1 and sets \f[I]errno\f[] accordingly. .PP On success, \f[B]pmempool_feature_enable\f[]() returns 0. On error, it returns \-1 and sets \f[I]errno\f[] accordingly. .PP On success, \f[B]pmempool_feature_disable\f[]() returns 0. On error, it returns \-1 and sets \f[I]errno\f[] accordingly. .PP If \f[I]path\f[] points poolset with remote replica \f[B]errno\f[] is set to EINVAL and function returns \-1. .PP If non zero \f[I]flags\f[] are provided \f[B]errno\f[] is set to EINVAL and function returns \-1. .SH SEE ALSO .PP \f[B]poolset\f[](5) and \f[B]\f[]