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

NAME

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

SYNOPSIS

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

DESCRIPTION

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

RETURN VALUE

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

SEE ALSO

31       libpmemblk(7) and <https://pmem.io>
32
33
34
35PMDK -                            2023-06-05                                ()
Impressum