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

NAME

6       rpmem_persist(),  rpmem_read(),  --  functions  to copy and read remote
7       pools
8

SYNOPSIS

10              #include <librpmem.h>
11
12              int rpmem_persist(RPMEMpool *rpp, size_t offset,
13                  size_t length, unsigned lane);
14              int rpmem_deep_persist(RPMEMpool *rpp, size_t offset,
15                  size_t length, unsigned lane);
16              int rpmem_read(RPMEMpool *rpp, void *buff, size_t offset,
17                  size_t length, unsigned lane);
18

DESCRIPTION

20       The rpmem_persist() function copies data of given length at given  off‐
21       set  from  the  associated local memory pool and makes sure the data is
22       persistent on the remote node before the function returns.  The  remote
23       node is identified by the rpp handle which must be returned from either
24       rpmem_open(3) or  rpmem_create(3).   The  offset  is  relative  to  the
25       pool_addr  specified  in the rpmem_open(3) or rpmem_create(3) call.  If
26       the remote pool was created using  rpmem_create()  with  non-NULL  cre‐
27       ate_attr  argument, offset has to be greater or equal to 4096.  In that
28       case the first 4096 bytes of the pool is  used  for  storing  the  pool
29       matadata  and cannot be overwritten.  If the pool was created with NULL
30       create_attr argument, the pool metadata is not stored with the pool and
31       offset  can  be any nonnegative number.  The offset and length combined
32       must not exceed the pool_size passed  to  rpmem_open(3)  or  rpmem_cre‐
33       ate(3).   The  rpmem_persist()  operation  is performed using the given
34       lane number.  The lane must be less than  the  value  returned  by  rp‐
35       mem_open(3)  or  rpmem_create(3) through the nlanes argument (so it can
36       take a value from 0 to nlanes - 1).
37
38       The rpmem_deep_persist() function works in the same way  as  rpmem_per‐
39       sist(3)  function,  but  additionaly  it flushes the data to the lowest
40       possible  persistency  domain  available  from  software.   Please  see
41       pmem_deep_persist(3) for details.
42
43       The rpmem_read() function reads length bytes of data from a remote pool
44       at offset and copies it to the buffer buff.  The operation is performed
45       on  the  specified lane.  The lane must be less than the value returned
46       by rpmem_open(3) or rpmem_create(3) through the nlanes argument (so  it
47       can take a value from 0 to nlanes - 1).  The rpp must point to a remote
48       pool opened or created previously by rpmem_open(3) or rpmem_create(3).
49

RETURN VALUE

51       The rpmem_persist() function returns 0 if the entire  memory  area  was
52       made  persistent  on  the remote node.  Otherwise it returns a non-zero
53       value and sets errno appropriately.
54
55       The rpmem_read() function returns 0 if  the  data  was  read  entirely.
56       Otherwise it returns a non-zero value and sets errno appropriately.
57

SEE ALSO

59       rpmem_create(3),   rpmem_open(3),  rpmem_persist(3),  sysconf(3),  lim‐
60       its.conf(5), libpmemobj(7) and <http://pmem.io>
61
62
63
64PMDK - rpmem API version 1.2      2018-03-13                  RPMEM_PERSIST(3)
Impressum