forked from vmware-archive/pg_rewind
-
Notifications
You must be signed in to change notification settings - Fork 0
/
datapagemap.h
32 lines (26 loc) · 917 Bytes
/
datapagemap.h
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
/*-------------------------------------------------------------------------
*
* datapagemap.h
*
* Copyright (c) 2013-2015 VMware, Inc. All Rights Reserved.
*
*-------------------------------------------------------------------------
*/
#ifndef DATAPAGEMAP_H
#define DATAPAGEMAP_H
#include "storage/relfilenode.h"
#include "storage/block.h"
struct datapagemap
{
char *bitmap;
int bitmapsize;
};
typedef struct datapagemap datapagemap_t;
typedef struct datapagemap_iterator datapagemap_iterator_t;
extern datapagemap_t *datapagemap_create(void);
extern void datapagemap_destroy(datapagemap_t *map);
extern void datapagemap_add(datapagemap_t *map, BlockNumber blkno);
extern datapagemap_iterator_t *datapagemap_iterate(datapagemap_t *map);
extern bool datapagemap_next(datapagemap_iterator_t *iter, BlockNumber *blkno);
extern void datapagemap_print(datapagemap_t *map);
#endif /* DATAPAGEMAP_H */