Add a regression test for EC bitmap recovery losing a parity chunk
This commit is contained in:
@@ -518,3 +518,11 @@ bool is_zero(void *buf, size_t size)
|
||||
}
|
||||
return true;
|
||||
}
|
||||
|
||||
bool memcheck(uint8_t *buf, uint8_t byte, size_t len)
|
||||
{
|
||||
for (size_t i = 0; i < len; i++)
|
||||
if (buf[i] != byte)
|
||||
return false;
|
||||
return true;
|
||||
}
|
||||
|
||||
@@ -35,5 +35,6 @@ std::string realpath_str(std::string path, bool nofail = true);
|
||||
std::string strprintf(const char *fmt, ...) __attribute__((format(printf, 1, 2)));
|
||||
std::string format_datetime(uint64_t unixtime);
|
||||
bool is_zero(void *buf, size_t size);
|
||||
bool memcheck(uint8_t *buf, uint8_t byte, size_t len);
|
||||
|
||||
#pragma GCC visibility pop
|
||||
|
||||
Reference in New Issue
Block a user