1PMEM2_BADBLOCK_NEXT(3) PMDK Programmer's Manual PMEM2_BADBLOCK_NEXT(3)
2
3
4
6 pmem2_badblock_next() - read the next bad block for the given bad block
7 context *bbctx.
8
10 #include <libpmem2.h>
11
12 struct pmem2_badblock;
13 struct pmem2_badblock_context;
14
15 int pmem2_badblock_next(
16 struct pmem2_badblock_context *bbctx,
17 struct pmem2_badblock *bb);
18
20 The pmem2_badblock_next() function reads the next bad block for the
21 given bad block context *bbctx.
22
23 It is not supported on Windows.
24
26 The pmem2_badblock_next() function returns 0 and stores the next bad
27 block in *bb on success or it returns a negative error code when there
28 are no more bad blocks for the given bad block context *bbctx.
29
31 pmem2_badblock_next() can fail with the following error:
32
33 • PMEM2_E_NO_BAD_BLOCK_FOUND - there are no more bad blocks for the
34 given bad block context *bbctx, *bb is undefined in this case.
35
36 • PMEM2_E_NOSUPP - on Windows or when the OS does not support this
37 functionality
38
40 pmem2_badblock_context_new(3), pmem2_badblock_clear(3), libpmem2(7) and
41 <https://pmem.io>
42
43
44
45PMDK - pmem2 API version 1.0 2021-09-24 PMEM2_BADBLOCK_NEXT(3)