NAME
SYNOPSIS
DESCRIPTION
RETURN VALUE
ERRORS
SEE ALSO
pmemset_config_set_required_store_granularity() - set granularity required for pmemset structure.
#include <libpmemset.h>
int pmemset_config_set_required_store_granularity(struct pmemset_config *cfg,
enum pmem2_granularity g);
The pmemset_config_set_required_store_granularity() sets maximum permitted granularity value g requested for entire pmemset object.
Each part has to have the same effective granularity of mapped parts - detected and initialized during pmemset_map(3). It means that the user cannot use parts with a different effective granularity within one pmemset. To read effective granularity of the pmemset after mapping the first, use pmemset_get_store_granularity(3).
Regardless of the pmemset source type, the libpmemset(7) library uses libpmem2(7) API to map parts.
For this reason, the granularity concept is also valid for libpmemset(7) functions, and granularity g must be one of the following values:
PMEM2_GRANULARITY_BYTE
PMEM2_GRANULARITY_CACHE_LINE
PMEM2_GRANULARITY_PAGE
For more information please read pmem2_config_set_required_store_granularity(3) man page and section GRANULARITY in the libpmem2(7) man.
The pmemset_config_set_required_store_granularity() function returns 0 on success or a negative error code on failure.
The pmemset_config_set_required_store_granularity() can fail with the following error:
pmem2_config_set_required_store_graularity(3), pmemset_get_store_granularity(3), pmemset_map(3), libpmem2(7), libpmemset(7) and http://pmem.io
The contents of this web site and the associated GitHub repositories are BSD-licensed open source.