pmemset API version 1.0

The PMDK repository on GitHub is the ultimate source of information on PMDK from release 2.0! For all questions and to submit eventual issues please follow to that repository. The PMDK documentation collected here should be valid up to the 1.13.1 release but is maintained only on a best-effort basis and may not reflect the latest state of the art.

NAME
SYNOPSIS
DESCRIPTION
RETURN VALUE
ERRORS
SEE ALSO

NAME

pmemset_config_set_required_store_granularity() - set granularity required for pmemset structure.

SYNOPSIS

#include <libpmemset.h>

int pmemset_config_set_required_store_granularity(struct pmemset_config *cfg,
	enum pmem2_granularity g);

DESCRIPTION

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_part_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.

RETURN VALUE

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

ERRORS

The pmemset_config_set_required_store_granularity() can fail with the following error:

  • PMEMSET_E_GRANULARITY_NOT_SUPPORTED - granularity g is not a valid value.

SEE ALSO

pmem2_config_set_required_store_graularity(3), pmemset_get_store_granularity(3), pmemset_part_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.