Log Message: |
Ensure that the p2l index file format in FSFS is independent of the
machine's endianess.
We handle FNV-1 checksums as integers and shall only use a definitive
byte order in the digest and on disk. I.e. we must no longer do a
conversion of the result in the checksum function itself.
The on-disk part is handled by the integer stream already (always little
endian) but we used a big endian input before. Hence, the on-disk
representation changes. For the digest part, we convert to / from big
endian when writing to the digest / reading from it.
FSX is not affected ATM as it does not use index checksums, yet.
* subversion/libsvn_fs_fs/fs_fs.c
(write_revision_zero): Update the checksum parts of the rev 0 template.
* subversion/libsvn_subr/fnv1a.c
(finalize_fnv1a_32x4,
svn__fnv1a_32): The checksum value is no longer platform dependent.
* subversion/libsvn_subr/checksum.c
(svn_checksum,
svn_checksum_final): Make sure the digest has a definitive, platform
independent byte order.
* subversion/libsvn_fs_fs/transaction.c
(fnv1a_checksum_finalize): Convert from byte ordering used in the
digest back to host order.
* subversion/libsvn_fs_fs/verify.c
(expected_streamed_checksum): Same.
Patch by: philip
|