set a granularity in pmem2_config structure.


#include <libpmem2.h>

enum pmem2_granularity {
int pmem2_config_set_required_store_granularity(struct pmem2_config *cfg,
        enum pmem2_granularity g);


The pmem2_config_set_required_store_granularity() sets a maximum permitted granularity g requested by user in the pmem2_config structure.

Granularity must be one of the following values:

A description of the granularity concept can be found in libpmem2(7) manpage.

Return Value

The pmem2_config_set_required_store_granularity() function returns 0 on success or a negative error code on failure.


The pmem2_config_set_required_store_granularity() can fail with the following errors:

See Also

pmem2_config_new(3), libpmem2(7) and <>

Referenced By

libpmem2(7), pmem2_map_from_existing(3), pmem2_map_new(3).

2022-08-25 PMDK - pmem2 API version 1.0 PMDK Programmer's Manual