.\" Automatically generated by Pandoc 2.2.1 .\" .TH "PMEMPOOL_FEATURE_QUERY" "3" "2019-02-19" "PMDK - pmempool API version 1.3" "PMDK Programmer's Manual" .hy .\" Copyright 2014-2019, Intel Corporation .\" .\" Redistribution and use in source and binary forms, with or without .\" modification, are permitted provided that the following conditions .\" are met: .\" .\" * Redistributions of source code must retain the above copyright .\" notice, this list of conditions and the following disclaimer. .\" .\" * Redistributions in binary form must reproduce the above copyright .\" notice, this list of conditions and the following disclaimer in .\" the documentation and/or other materials provided with the .\" distribution. .\" .\" * Neither the name of the copyright holder nor the names of its .\" contributors may be used to endorse or promote products derived .\" from this software without specific prior written permission. .\" .\" THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS .\" "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT .\" LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR .\" A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT .\" OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, .\" SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT .\" LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, .\" DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY .\" THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT .\" (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE .\" OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. .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[]