1PMEMLOG_CTL_GET(3) PMDK Programmer's Manual PMEMLOG_CTL_GET(3)
2
3
4
6 pmemlog_ctl_get(), pmemlog_ctl_set(), pmemlog_ctl_exec() - Query and
7 modify libpmemlog internal behavior (EXPERIMENTAL)
8
10 #include <libpmemlog.h>
11
12 int pmemlog_ctl_get(PMEMlogpool *plp, const char *name, void *arg); (EXPERIMENTAL)
13 int pmemlog_ctl_set(PMEMlogpool *plp, const char *name, void *arg); (EXPERIMENTAL)
14 int pmemlog_ctl_exec(PMEMlogpool *plp, const char *name, void *arg); (EXPERIMENTAL)
15
17 The pmemlog_ctl_get(), pmemlog_ctl_set() and pmemlog_ctl_exec() func‐
18 tions provide a uniform interface for querying and modifying the inter‐
19 nal behavior of libpmemlog(7) through the control (CTL) namespace.
20
21 The name argument specifies an entry point as defined in the CTL name‐
22 space specification. The entry point description specifies whether the
23 extra arg is required. Those two parameters together create a CTL
24 query. The functions and the entry points are thread-safe unless indi‐
25 cated otherwise below. If there are special conditions for calling an
26 entry point, they are explicitly stated in its description. The func‐
27 tions propagate the return value of the entry point. If either name or
28 arg is invalid, -1 is returned.
29
30 If the provided ctl query is valid, the CTL functions will always re‐
31 turn 0 on success and -1 on failure, unless otherwise specified in the
32 entry point description.
33
34 See more in pmem_ctl(5) man page.
35
37 prefault.at_create | rw | global | int | int | - | boolean
38
39 If set, every page of the pool will be touched and written to when the
40 pool is created, in order to trigger page allocation and minimize the
41 performance impact of pagefaults. Affects only the pmemlog_create()
42 function.
43
44 Always returns 0.
45
46 prefault.at_open | rw | global | int | int | - | boolean
47
48 If set, every page of the pool will be touched and written to when the
49 pool is opened, in order to trigger page allocation and minimize the
50 performance impact of pagefaults. Affects only the pmemlog_open()
51 function.
52
53 Always returns 0.
54
55 sds.at_create | rw | global | int | int | - | boolean
56
57 If set, force-enables or force-disables SDS feature during pool cre‐
58 ation. Affects only the pmemlog_create() function. See pmempool_fea‐
59 ture_query(3) for information about SDS (SHUTDOWN_STATE) feature.
60
61 Always returns 0.
62
63 copy_on_write.at_open | rw | global | int | int | - | boolean
64
65 If set, pool is mapped in such a way that modifications don't reach the
66 underlying medium. From the user's perspective this means that when
67 the pool is closed all changes are reverted. This feature is not sup‐
68 ported for pools located on Device DAX.
69
70 Always returns 0.
71
73 In addition to direct function call, each write entry point can also be
74 set using two alternative methods.
75
76 The first method is to load a configuration directly from the PMEM‐
77 LOG_CONF environment variable.
78
79 The second method of loading an external configuration is to set the
80 PMEMLOG_CONF_FILE environment variable to point to a file that contains
81 a sequence of ctl queries.
82
83 See more in pmem_ctl(5) man page.
84
86 libpmemlog(7), pmem_ctl(5) and <https://pmem.io>
87
88
89
90PMDK - pmemlog API version 1.1 2022-08-25 PMEMLOG_CTL_GET(3)