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