pmem2_badblock_clear - Man Page

clear the given bad block

Synopsis

#include <libpmem2.h>

struct pmem2_badblock;
struct pmem2_badblock_context;

int pmem2_badblock_clear(
        struct pmem2_badblock_context *bbctx,
        struct pmem2_badblock *bb);

Description

The pmem2_badblock_clear() function clears the given *bb bad block.

It means that the pmem2_badblock_clear() function unmaps bad blocks and maps new, healthy, blocks in place of the bad ones. The new blocks are zeroed. The content of the bad blocks is lost.

Return Value

The pmem2_badblock_clear() function clears the given *bb bad block and returns 0 on success or a negative error code on failure.

Errors

pmem2_badblock_clear() can fail with the following errors:

See Also

pmem2_badblock_context_new(3), pmem2_badblock_next(3), libpmem2(7) and <https://pmem.io>

Referenced By

libpmem2(7), pmem2_badblock_context_new(3), pmem2_badblock_next(3), pmem2_source_pread_mcsafe(3).

2024-01-25 PMDK - PMDK Programmer's Manual