Comment 11 for bug 1666320

Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Related fix merged to liberasurecode (master)

Reviewed: https://review.openstack.org/636556
Committed: https://git.openstack.org/cgit/openstack/liberasurecode/commit/?id=7e97b2f808e1115425eef527899b27528f05af3a
Submitter: Zuul
Branch: master

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.

    Change-Id: Ibd5e4e6c02be00540a9648cc7e0f8efda275bf3f
    Related-Change: Ib5ea2a830c7c23d66bf2ca404a3eb84ad00c5bc5
    Related-Bug: 1666320