commit 7e97b2f808e1115425eef527899b27528f05af3a
Author: Pete Zaitcev <email address hidden>
Date: Tue Feb 12 22:08:26 2019 -0600
Make our alt crc32 more portable
Apparently the author of our old crc32 assumed that shifting an int
to the right sign-extends, which is not always the case. Result is,
building and running make test on s390x fails. The fix is to force
a sign-extension using the "xor 0x80; sub 0x80" trick.
N.B. This does not cause a compatibility problem, because by a
miracle the "broken" crc32_alt was actually computing a stock
crc32, same that zlib has. Therefore, if someone, somewhere,
ran a Swift cluster on s390x with erasure coding policy,
the data in it is already stored with zlib checksums, as we
do it now anyway. This fix only permits the tests pass, which
used the bad data sample from x86.
Reviewed: https:/ /review. openstack. org/636556 /git.openstack. org/cgit/ openstack/ liberasurecode/ commit/ ?id=7e97b2f808e 1115425eef52789 9b27528f05af3a
Committed: https:/
Submitter: Zuul
Branch: master
commit 7e97b2f808e1115 425eef527899b27 528f05af3a
Author: Pete Zaitcev <email address hidden>
Date: Tue Feb 12 22:08:26 2019 -0600
Make our alt crc32 more portable
Apparently the author of our old crc32 assumed that shifting an int
to the right sign-extends, which is not always the case. Result is,
building and running make test on s390x fails. The fix is to force
a sign-extension using the "xor 0x80; sub 0x80" trick.
N.B. This does not cause a compatibility problem, because by a
miracle the "broken" crc32_alt was actually computing a stock
crc32, same that zlib has. Therefore, if someone, somewhere,
ran a Swift cluster on s390x with erasure coding policy,
the data in it is already stored with zlib checksums, as we
do it now anyway. This fix only permits the tests pass, which
used the bad data sample from x86.
Change-Id: Ibd5e4e6c02be00 540a9648cc7e0f8 efda275bf3f d66bf2ca404a3eb 84ad00c5bc5
Related-Change: Ib5ea2a830c7c23
Related-Bug: 1666320