Commit d5209a5a authored by Mike Hibler's avatar Mike Hibler

Fix the "split hash" (-X) logic. I was generating incorrect hash files.

parent 07fabe28
......@@ -1332,16 +1332,17 @@ fprintf(stderr, "HACK: failed: [%u-%u][%u-%u]\n", lreg->start, lreg->start+lreg-
}
/*
* If this is the last piece of the last region
* in a chunk and it is not a full hashblksize piece,
* then stash it to see if it is a range that spans
* chunks.
* in a chunk and it does not end on a hashblksize
* boundary, then stash it to see if it is a range
* that spans chunks.
*/
if (hsize < hashblksize && rsize == hsize &&
nreg + 1 == blockhdr->regioncount) {
if (rsize == hsize &&
nreg + 1 == blockhdr->regioncount &&
((rstart + rsize) % hashblksizeinsec) != 0) {
size_t bytes = sectobytes(hsize);
lhash.region.start = rstart;
lhash.region.size = hsize;
lhash.region.size = rsize;
lhash.chunkno = chunkno;
(void)(*hashfunc)(rbuf->data, bytes,
lhash.hash);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment