1PMEMPOOL_FEATURE_QUERY(3) PMDK Programmer's Manual PMEMPOOL_FEATURE_QUERY(3)
2
3
4
6 pmempool_feature_query(), pmempool_feature_enable(), pmempool_fea‐
7 ture_disable() - toggle or query pool set features
8
10 #include <libpmempool.h>
11
12 int pmempool_feature_query(const char *path, enum pmempool_feature feature, unsigned flags);
13
14 int pmempool_feature_enable(const char *path, enum pmempool_feature feature, unsigned flags);
15
16 int pmempool_feature_disable(const char *path, enum pmempool_feature feature, unsigned flags);
17
19 The feature argument accepts following values:
20
21 • PMEMPOOL_FEAT_SINGLEHDR - only the first part in each replica con‐
22 tains the pool part internal metadata. This value can be used only
23 with pmempool_feature_query(). It can not be enabled or disabled.
24 For details see poolset(5).
25
26 • PMEMPOOL_FEAT_CKSUM_2K - only the first 2KiB of pool part internal
27 metadata is checksummed. Other features may depend on this one to
28 store additional metadata in otherwise unused second 2KiB part of a
29 header. When PMEMPOOL_FEAT_CKSUM_2K is disabled whole 4KiB is check‐
30 summed.
31
32 • PMEMPOOL_FEAT_SHUTDOWN_STATE - enables additional check performed
33 during pool open which verifies pool consistency in the presence of
34 dirty shutdown. PMEMPOOL_FEAT_CKSUM_2K has to be enabled prior to
35 PMEMPOOL_FEAT_SHUTDOWN_STATE otherwise enabling PMEMPOOL_FEAT_SHUT‐
36 DOWN_STATE will fail.
37
38 • PMEMPOOL_FEAT_CHECK_BAD_BLOCKS - enables checking bad blocks per‐
39 formed during opening a pool and fixing bad blocks performed by pmem‐
40 pool-sync during syncing a pool. For details see pmempool-fea‐
41 ture(1).
42
43 The pmempool_feature_query() function checks state of feature in the
44 pool set pointed by path.
45
46 The pmempool_feature_enable() function enables feature in the pool set
47 pointed by path.
48
49 The pmempool_feature_disable() function disables feature in the pool
50 set pointed by path.
51
53 Poolsets with features not defined in this document (e.g. enabled by
54 the newer software version) are not supported.
55
57 pmempool_feature_query(), pmempool_feature_enable() and pmempool_fea‐
58 ture_disable() are not fail safe.
59
61 On success, pmempool_feature_query() returns 0 if feature is disabled
62 or 1 if it is enabled. On error, it returns -1 and sets errno accord‐
63 ingly.
64
65 On success, pmempool_feature_enable() returns 0. On error, it returns
66 -1 and sets errno accordingly.
67
68 On success, pmempool_feature_disable() returns 0. On error, it returns
69 -1 and sets errno accordingly.
70
71 If path points poolset with remote replica errno is set to EINVAL and
72 function returns -1.
73
74 If non zero flags are provided errno is set to EINVAL and function re‐
75 turns -1.
76
78 poolset(5) and <https://pmem.io>
79
80
81
82PMDK - pmempool API version 1.3 2020-10-28 PMEMPOOL_FEATURE_QUERY(3)