]> git.apps.os.sepia.ceph.com Git - ceph.git/commit
checksum: Fix incorrect use of __le16/32/64
authorUlrich Weigand <ulrich.weigand@de.ibm.com>
Mon, 2 Sep 2019 19:23:13 +0000 (21:23 +0200)
committerUlrich Weigand <ulrich.weigand@de.ibm.com>
Thu, 5 Sep 2019 08:50:04 +0000 (10:50 +0200)
commit63609fd1aef9811d9d3c9bd27bb9d2c88f1c2fe8
treeef41a90f0dee005e0c53c4af59aedd9cb616ae17
parent754b82ee15e6d1b52bc83011c2d7680bdb1d3830
checksum: Fix incorrect use of __le16/32/64

Use ceph_le16/32/64 instead of __le16/32/64 (which are no-op outside
of kernel code).

Note that I've changed the Alg::calc routines to return the
init_value_t type instead of value_t, to avoid having to
introduce explicit byte-swapping calls to init_le16/32/64 in
many places.  (This way, the byte-swapping happens implicitly
at the very end, wher the init_value_t value is assigned via
a value_t pointer.)

Fixes (partially): https://tracker.ceph.com/issues/41605

Signed-off-by: Ulrich Weigand <ulrich.weigand@de.ibm.com>
src/common/Checksummer.h