pmem2_badblock_next - Man Page

read the next bad block for the given bad block context *bbctx.

Synopsis

#include <libpmem2.h>

struct pmem2_badblock;
struct pmem2_badblock_context;

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

Description

The pmem2_badblock_next() function reads the next bad block for the given bad block context *bbctx.

Return Value

The pmem2_badblock_next() function returns 0 and stores the next bad block in *bb on success or it returns a negative error code when there are no more bad blocks for the given bad block context *bbctx.

Errors

pmem2_badblock_next() can fail with the following error:

See Also

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

Referenced By

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

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