pmem2_badblock_next(3)

pmem2_badblock_next3

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

Usage

#include <libpmem2.h>
struct pmem2_badblock;
struct pmem2_badblock_context;
int pmem2_badblock_next(
        struct pmem2_badblock_context *bbctx,
        struct pmem2_badblock *bb);

Overview

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

It is not supported on Windows.

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:

•

PMEM2_E_NO_BAD_BLOCK_FOUND - there are no more bad blocks for the given bad block context *bbctx, *bb is undefined in this case.

•

PMEM2_E_NOSUPP - on Windows or when the OS does not support this functionality

Releases

3 releases since Debian 11 (Bullseye); the text changed 2 times.

  1. 11
  2. 12
  3. 13

From libpmem2-dev 1.13.1-1.1+b1 in Debian 13 (Trixie). Parsed by carta from the page's man source.