.\" Automatically generated by Pandoc 2.9.2.1 .\" .TH "" "" "2023-05-26" "PMDK - " "PMDK Programmer's Manual" .hy .\" SPDX-License-Identifier: BSD-3-Clause .\" Copyright 2020, Intel Corporation .SH NAME .PP \f[B]pmem2_config_set_required_store_granularity\f[R]() - set a granularity in pmem2_config structure. .SH SYNOPSIS .IP .nf \f[C] #include enum pmem2_granularity { PMEM2_GRANULARITY_BYTE, PMEM2_GRANULARITY_CACHE_LINE, PMEM2_GRANULARITY_PAGE, }; int pmem2_config_set_required_store_granularity(struct pmem2_config *cfg, enum pmem2_granularity g); \f[R] .fi .SH DESCRIPTION .PP The \f[B]pmem2_config_set_required_store_granularity\f[R]() sets a maximum permitted granularity \f[I]g\f[R] requested by user in the \f[I]pmem2_config\f[R] structure. .PP Granularity must be one of the following values: .IP \[bu] 2 \f[B]PMEM2_GRANULARITY_BYTE\f[R] .IP \[bu] 2 \f[B]PMEM2_GRANULARITY_CACHE_LINE\f[R] .IP \[bu] 2 \f[B]PMEM2_GRANULARITY_PAGE\f[R] .PP A description of the granularity concept can be found in \f[B]libpmem2\f[R](7) manpage. .SH RETURN VALUE .PP The \f[B]pmem2_config_set_required_store_granularity\f[R]() function returns 0 on success or a negative error code on failure. .SH ERRORS .PP The \f[B]pmem2_config_set_required_store_granularity\f[R]() can fail with the following errors: .IP \[bu] 2 \f[B]PMEM2_E_GRANULARITY_NOT_SUPPORTED\f[R] - granularity \f[I]g\f[R] is not a valid value. .SH SEE ALSO .PP \f[B]pmem2_config_new\f[R](3), \f[B]libpmem2\f[R](7) and \f[B]\f[R]