mirror of
https://github.com/amadvance/snapraid.git
synced 2026-12-04 05:40:14 -05:00
Keep generation ambiguous for legacy hashes in check repair to prevent false CURRENT certification on size changes
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
b82ee5ff56
commit
c09b850047
3 changed files with 38 additions and 25 deletions
|
|
@ -282,6 +282,19 @@ void memhash(unsigned kind, const unsigned char* seed, void* digest, const void*
|
|||
*/
|
||||
void memhash_block(unsigned kind, const unsigned char* seed, void* digest, const void* src, size_t logical_size, size_t block_size);
|
||||
|
||||
/**
|
||||
* Return !=0 if the hash kind operates on the complete canonical RAID block.
|
||||
*
|
||||
* Legacy hashes (Murmur3, Spooky2) preserve historical semantics and hash
|
||||
* only the logical file bytes.
|
||||
* Modern hashes (MuseAir) hash the complete zero-padded RAID block up to
|
||||
* block_size.
|
||||
*/
|
||||
static inline int memhash_is_block(unsigned kind)
|
||||
{
|
||||
return kind == HASH_MUSEAIR;
|
||||
}
|
||||
|
||||
/**
|
||||
* Return the hash name.
|
||||
*/
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue