1PMEMBLK_SET_ZERO(3)        PMDK Programmer's Manual        PMEMBLK_SET_ZERO(3)
2
3
4

NAME

6       pmemblk_set_zero(), pmemblk_set_error() - block management functions
7

SYNOPSIS

9              #include <libpmemblk.h>
10
11              int pmemblk_set_zero(PMEMblkpool *pbp, long long blockno);
12              int pmemblk_set_error(PMEMblkpool *pbp, long long blockno);
13

DESCRIPTION

15       The pmemblk_set_zero() function writes zeros to block number blockno in
16       persistent memory resident array of blocks pbp.  Using this function is
17       faster  than actually writing a block of zeros since libpmemblk(7) uses
18       metadata to indicate the block should read back as zero.
19
20       The pmemblk_set_error() function sets the error state for block  number
21       blockno  in persistent memory resident array of blocks pbp.  A block in
22       the error state returns errno EIO when read.  Writing the block  clears
23       the error state and returns the block to normal use.
24

RETURN VALUE

26       On  success,  pmemblk_set_zero()  and pmemblk_set_error() return 0.  On
27       error, they return -1 and set errno appropriately.
28

SEE ALSO

30       libpmemblk(7) and <https://pmem.io>
31
32
33
34PMDK - pmemblk API version 1.1    2020-01-31               PMEMBLK_SET_ZERO(3)
Impressum