.\" Automatically generated by Pandoc 2.10.1 .\" .TH "PMEMBLK_CTL_GET" "3" "2020-10-28" "PMDK - pmemblk API version 1.1" "PMDK Programmer's Manual" .hy .\" SPDX-License-Identifier: BSD-3-Clause .\" Copyright 2018-2019, Intel Corporation .SH NAME .PP \f[B]pmemblk_ctl_get\f[R](), \f[B]pmemblk_ctl_set\f[R](), \f[B]pmemblk_ctl_exec\f[R]() - Query and modify libpmemblk internal behavior (EXPERIMENTAL) .SH SYNOPSIS .IP .nf \f[C] #include int pmemblk_ctl_get(PMEMblkpool *pbp, const char *name, void *arg); (EXPERIMENTAL) int pmemblk_ctl_set(PMEMblkpool *pbp, const char *name, void *arg); (EXPERIMENTAL) int pmemblk_ctl_exec(PMEMblkpool *pbp, const char *name, void *arg); (EXPERIMENTAL) \f[R] .fi .SH DESCRIPTION .PP The \f[B]pmemblk_ctl_get\f[R](), \f[B]pmemblk_ctl_set\f[R]() and \f[B]pmemblk_ctl_exec\f[R]() functions provide a uniform interface for querying and modifying the internal behavior of \f[B]libpmemblk\f[R](7) through the control (CTL) namespace. .PP The \f[I]name\f[R] argument specifies an entry point as defined in the CTL namespace specification. The entry point description specifies whether the extra \f[I]arg\f[R] is required. Those two parameters together create a CTL query. The functions and the entry points are thread-safe unless indicated otherwise below. If there are special conditions for calling an entry point, they are explicitly stated in its description. The functions propagate the return value of the entry point. If either \f[I]name\f[R] or \f[I]arg\f[R] is invalid, -1 is returned. .PP If the provided ctl query is valid, the CTL functions will always return 0 on success and -1 on failure, unless otherwise specified in the entry point description. .PP See more in \f[B]pmem_ctl\f[R](5) man page. .SH CTL NAMESPACE .PP prefault.at_create | rw | global | int | int | - | boolean .PP If set, every page of the pool will be touched and written to when the pool is created, in order to trigger page allocation and minimize the performance impact of pagefaults. Affects only the \f[B]pmemblk_create\f[R]() function. .PP Always returns 0. .PP prefault.at_open | rw | global | int | int | - | boolean .PP If set, every page of the pool will be touched and written to when the pool is opened, in order to trigger page allocation and minimize the performance impact of pagefaults. Affects only the \f[B]pmemblk_open\f[R]() function. .PP Always returns 0. .PP sds.at_create | rw | global | int | int | - | boolean .PP If set, force-enables or force-disables SDS feature during pool creation. Affects only the \f[B]pmemblk_create\f[R]() function. See \f[B]pmempool_feature_query\f[R](3) for information about SDS (SHUTDOWN_STATE) feature. .PP Always returns 0. .PP copy_on_write.at_open | rw | global | int | int | - | boolean .PP If set, pool is mapped in such a way that modifications don\[cq]t reach the underlying medium. From the user\[cq]s perspective this means that when the pool is closed all changes are reverted. This feature is not supported for pools located on Device DAX. .PP Always returns 0. .SH CTL EXTERNAL CONFIGURATION .PP In addition to direct function call, each write entry point can also be set using two alternative methods. .PP The first method is to load a configuration directly from the \f[B]PMEMBLK_CONF\f[R] environment variable. .PP The second method of loading an external configuration is to set the \f[B]PMEMBLK_CONF_FILE\f[R] environment variable to point to a file that contains a sequence of ctl queries. .PP See more in \f[B]pmem_ctl\f[R](5) man page. .SH SEE ALSO .PP \f[B]libpmemblk\f[R](7), \f[B]pmem_ctl\f[R](5) and \f[B]\f[R]