pmem2_deep_flush - Man Page

highly reliable persistent memory synchronization

Synopsis

#include <libpmem2.h>

int pmem2_deep_flush(struct pmem2_map *map, void *ptr, size_t size)

Description

The pmem2_deep_flush() function forces any changes in the range [ptr, ptr+len) from the map to be stored durably in the most reliable persistence domain available to software. In particular, on supported platforms, this enables the code not to rely on automatic cache or WPQ (write pending queue) flush on power failure (ADR/eADR).

Since this operation is usually much more expensive than regular persist, it should be used sparingly. Typically, the application should only ever use this function as a precaution against hardware failures, e.g., in code that detects silent data corruption caused by unsafe shutdown (see more in libpmem2_unsafe_shutdown(7)).

Return Value

The pmem2_deep_flush() function returns 0 on success or an error code on failure.

Errors

The pmem2_deep_flush() can fail with the following errors:

See Also

msync(2), pmem2_get_drain_fn(3), pmem2_get_persist_fn(3) pmem2_map(3), libpmem2(7) and http://pmem.io\c

Referenced By

libpmem2_unsafe_shutdown(7).

2024-07-18 PMDK - PMDK Programmer's Manual