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.

It is not supported on Windows.

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 <http://pmem.io>

Referenced By

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

2020-10-28 PMDK - pmem2 API version 1.0 PMDK Programmer's Manual