|
Zero
0.1.0
|
Bitmap data structure that controls the progress of restore. More...
#include <restore.h>
Public Types | |
| enum | State { State::UNRESTORED = 0, State::RESTORING = 1, State::RESTORED = 2 } |
Public Member Functions | |
| RestoreBitmap (size_t size) | |
| ~RestoreBitmap () | |
| size_t | get_size () |
| bool | is_unrestored (unsigned i) const |
| bool | is_restoring (unsigned i) const |
| bool | is_restored (unsigned i) const |
| bool | attempt_restore (unsigned i) |
| void | mark_restored (unsigned i) |
| unsigned | get_first_unrestored () const |
| unsigned | get_first_restoring () const |
Protected Attributes | |
| std::atomic< State > * | states |
| const size_t | _size |
Bitmap data structure that controls the progress of restore.
The bitmap contains one bit for each segment of the failed volume. All bits are initially "false", and a bit is set to "true" when the corresponding segment has been restored. This class is completely oblivious to pages inside a segment – it is the callers resposibility to interpret what a segment consists of.
|
strong |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
protected |
|
protected |
Get lowest false value and highest true value in order to compress serialized format. Such compression is effective in a single-pass or schedule. It is basically a run-length encoding, but supporting only a run of ones in the beginning and a run of zeroes in the end of the bitmap
1.8.12