pmem2 API version 1.0

The PMDK repository on GitHub is the ultimate source of information on PMDK from release 2.0! For all questions and to submit eventual issues please follow to that repository. The PMDK documentation collected here should be valid up to the 1.13.1 release but is maintained only on a best-effort basis and may not reflect the latest state of the art.

NAME
SYNOPSIS
DESCRIPTION
RETURN VALUE
SEE ALSO

NAME

pmem2_badblock_next() - 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.

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

SEE ALSO

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

The contents of this web site and the associated GitHub repositories are BSD-licensed open source.