What problem would this solve?
This in itself should be a performance boost. Currently, a file checksum, for a fully mapped file, needs to process size(file) bytes, whereas under this proposal it would be 32 * num_extents bytes, which should be much less. Similar gains happen per extent.
Because there are 3 running checksums: file, extent, and block, oans is effectively hashing the data 3 times. With this change it will be much closer to hashing the data only once.
This issue is also an intermediary step to providing resume for large files (#159).
Proposed solution
Have the file hash be a hash of the extent hashes and the extent hash be a hash of the block hashes.
It will be desirable, though not strictly required, for the hash file database to be reconstructed. If its not reconstructed, things will still work, except that no deduplication will happen between data with the new and old digests.
It might be interesting to create a small program that takes a blocksize, number of blocks, and optional blocks per extent and outputs the runtime of 3 running checksums vs the solution proposed here.
Alternatives considered
No response
What problem would this solve?
This in itself should be a performance boost. Currently, a file checksum, for a fully mapped file, needs to process size(file) bytes, whereas under this proposal it would be
32 * num_extentsbytes, which should be much less. Similar gains happen per extent.Because there are 3 running checksums: file, extent, and block,
oansis effectively hashing the data 3 times. With this change it will be much closer to hashing the data only once.This issue is also an intermediary step to providing resume for large files (#159).
Proposed solution
Have the file hash be a hash of the extent hashes and the extent hash be a hash of the block hashes.
It will be desirable, though not strictly required, for the hash file database to be reconstructed. If its not reconstructed, things will still work, except that no deduplication will happen between data with the new and old digests.
It might be interesting to create a small program that takes a blocksize, number of blocks, and optional blocks per extent and outputs the runtime of 3 running checksums vs the solution proposed here.
Alternatives considered
No response