mirror of
https://github.com/amadvance/snapraid.git
synced 2026-11-26 01:46:32 -05:00
Add MetroHash128 for speed measurement
This commit is contained in:
parent
d294c11b43
commit
b725333a49
6 changed files with 162 additions and 0 deletions
|
|
@ -2406,6 +2406,9 @@ static void state_read_content(struct snapraid_state* state, const char* path, S
|
|||
case 'k' :
|
||||
state->hash = HASH_SPOOKY2;
|
||||
break;
|
||||
case 'm' :
|
||||
state->hash = HASH_METRO;
|
||||
break;
|
||||
default :
|
||||
/* LCOV_EXCL_START */
|
||||
decoding_error(path, f);
|
||||
|
|
@ -2433,6 +2436,9 @@ static void state_read_content(struct snapraid_state* state, const char* path, S
|
|||
case 'k' :
|
||||
state->prevhash = HASH_SPOOKY2;
|
||||
break;
|
||||
case 'm' :
|
||||
state->prevhash = HASH_METRO;
|
||||
break;
|
||||
default :
|
||||
/* LCOV_EXCL_START */
|
||||
decoding_error(path, f);
|
||||
|
|
@ -2955,6 +2961,8 @@ static void* state_write_thread(void* arg)
|
|||
sputc('u', f);
|
||||
} else if (state->hash == HASH_SPOOKY2) {
|
||||
sputc('k', f);
|
||||
} else if (state->hash == HASH_METRO) {
|
||||
sputc('m', f);
|
||||
} else {
|
||||
/* LCOV_EXCL_START */
|
||||
log_fatal("Unexpected hash when writing the content file '%s'.\n", serrorfile(f));
|
||||
|
|
@ -2978,6 +2986,8 @@ static void* state_write_thread(void* arg)
|
|||
sputc('u', f);
|
||||
} else if (state->prevhash == HASH_SPOOKY2) {
|
||||
sputc('k', f);
|
||||
} else if (state->prevhash == HASH_METRO) {
|
||||
sputc('m', f);
|
||||
} else {
|
||||
/* LCOV_EXCL_START */
|
||||
log_fatal("Unexpected prevhash when writing the content file '%s'.\n", serrorfile(f));
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue