What problem would this solve?
Currently oans must start hashing a file from the beginning everytime a hash is needed. For example, if a 1Tb file is 6hours in to hashing and the oans process is interrupted (power outtage, OOM, ctrl+c, etc.), rerunning oans will have to start rehashing the large file from the beginning.
Proposed solution
Rehashing from the beginning must be done because the current digest is a hash of individual bytes and xxhash is not additive. Instead have the file hash be a hash of the extent hashes and the extent hash be a hash of the block hashes as suggested in #158.
Also, this will require #157, otherwise there will never be block or extent records for files in the middle of being hashed when an interruption occurs.
Alternatives considered
No response
What problem would this solve?
Currently
oansmust start hashing a file from the beginning everytime a hash is needed. For example, if a 1Tb file is 6hours in to hashing and theoansprocess is interrupted (power outtage, OOM, ctrl+c, etc.), rerunningoanswill have to start rehashing the large file from the beginning.Proposed solution
Rehashing from the beginning must be done because the current digest is a hash of individual bytes and
xxhashis not additive. Instead have the file hash be a hash of the extent hashes and the extent hash be a hash of the block hashes as suggested in #158.Also, this will require #157, otherwise there will never be block or extent records for files in the middle of being hashed when an interruption occurs.
Alternatives considered
No response