PMEM2_BADBLOCK_CLEAR(3) | PMDK Programmer's Manual | PMEM2_BADBLOCK_CLEAR(3) |
pmem2_badblock_clear() - clear the given bad block
#include <libpmem2.h> struct pmem2_badblock; struct pmem2_badblock_context; int pmem2_badblock_clear( struct pmem2_badblock_context *bbctx, struct pmem2_badblock *bb);
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.
The pmem2_badblock_clear() function clears the given *bb bad block and returns 0 on success or a negative error code on failure.
pmem2_badblock_clear() can fail with the following errors:
pmem2_badblock_context_new(3), pmem2_badblock_next(3), libpmem2(7) and <https://pmem.io>
2022-08-25 | PMDK - pmem2 API version 1.0 |