mirror of
https://github.com/amadvance/snapraid.git
synced 2026-12-05 06:10:13 -05:00
Replace physical reach tracking with the natural file and parity EOF
Some checks are pending
Build / build-mac (push) Waiting to run
Build / build-linux (push) Waiting to run
Build / build-arm32 (push) Waiting to run
Build / build-win (push) Waiting to run
Build / build-freebsd (push) Waiting to run
Build / build-musl (push) Waiting to run
CodeQL Advanced / Analyze (c-cpp) (push) Waiting to run
CodeQL Advanced / Analyze (actions) (push) Waiting to run
Some checks are pending
Build / build-mac (push) Waiting to run
Build / build-linux (push) Waiting to run
Build / build-arm32 (push) Waiting to run
Build / build-win (push) Waiting to run
Build / build-freebsd (push) Waiting to run
Build / build-musl (push) Waiting to run
CodeQL Advanced / Analyze (c-cpp) (push) Waiting to run
CodeQL Advanced / Analyze (actions) (push) Waiting to run
This commit is contained in:
parent
873a5561e4
commit
62ae6c3552
7 changed files with 195 additions and 278 deletions
|
|
@ -303,7 +303,7 @@ static void test_parity(void)
|
|||
static const struct {
|
||||
unsigned split_mac;
|
||||
data_off_t size[2];
|
||||
data_off_t physical_reach_size[2];
|
||||
data_off_t physical_size[2];
|
||||
data_off_t expected;
|
||||
} test[] = {
|
||||
{ 1, { 100, 0 }, { 100, 0 }, 100 },
|
||||
|
|
@ -326,13 +326,13 @@ static void test_parity(void)
|
|||
handle.split_mac = test[i].split_mac;
|
||||
for (s = 0; s < handle.split_mac; ++s) {
|
||||
handle.split_map[s].size = test[i].size[s];
|
||||
handle.split_map[s].physical_reach_size = test[i].physical_reach_size[s];
|
||||
handle.split_map[s].st.st_size = test[i].physical_size[s];
|
||||
}
|
||||
|
||||
parity_physical_reach_size(&handle, &size);
|
||||
parity_physical_size(&handle, &size);
|
||||
if (size != test[i].expected) {
|
||||
/* LCOV_EXCL_START */
|
||||
log_fatal(EINTERNAL, "Failed parity physical reach size test\n");
|
||||
log_fatal(EINTERNAL, "Failed parity physical size test\n");
|
||||
exit(EXIT_FAILURE);
|
||||
/* LCOV_EXCL_STOP */
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue