]> git-server-git.apps.pok.os.sepia.ceph.com Git - ceph.git/commitdiff
bluestore: Fix incorrect use of __le16/32/64
authorUlrich Weigand <ulrich.weigand@de.ibm.com>
Mon, 2 Sep 2019 19:26:16 +0000 (21:26 +0200)
committerUlrich Weigand <ulrich.weigand@de.ibm.com>
Wed, 2 Oct 2019 16:30:32 +0000 (18:30 +0200)
Use ceph_le16/32/64 instead of __le16/32/64 (which are no-op outside
of kernel code).

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

Signed-off-by: Ulrich Weigand <ulrich.weigand@de.ibm.com>
(cherry picked from commit ec84342fd8a2667646f1fe689a23af70fc7ed32a)
Signed-off-by: Ulrich Weigand <ulrich.weigand@de.ibm.com>
src/os/bluestore/BlueStore.cc
src/os/bluestore/bluestore_types.h

index 60baa85da0999b875b07e54a9b62c3695db5d2dc..6e8e7caa0db526d65a48857112183a24671ffeec 100644 (file)
@@ -639,9 +639,9 @@ struct Int64ArrayMergeOperator : public KeyValueDB::MergeOperator {
     ceph_assert(llen == rlen);
     ceph_assert((rlen % 8) == 0);
     new_value->resize(rlen);
-    const __le64* lv = (const __le64*)ldata;
-    const __le64* rv = (const __le64*)rdata;
-    __le64* nv = &(__le64&)new_value->at(0);
+    const ceph_le64* lv = (const ceph_le64*)ldata;
+    const ceph_le64* rv = (const ceph_le64*)rdata;
+    ceph_le64* nv = &(ceph_le64&)new_value->at(0);
     for (size_t i = 0; i < rlen >> 3; ++i) {
       nv[i] = lv[i] + rv[i];
     }
index 87fbd981d9f806f60f8bbfd613a0f9e1a171c935..f58a079c4af252c4c319d71b9ad84836740fe66c 100644 (file)
@@ -756,11 +756,11 @@ public:
     case 1:
       return reinterpret_cast<const uint8_t*>(p)[i];
     case 2:
-      return reinterpret_cast<const __le16*>(p)[i];
+      return reinterpret_cast<const ceph_le16*>(p)[i];
     case 4:
-      return reinterpret_cast<const __le32*>(p)[i];
+      return reinterpret_cast<const ceph_le32*>(p)[i];
     case 8:
-      return reinterpret_cast<const __le64*>(p)[i];
+      return reinterpret_cast<const ceph_le64*>(p)[i];
     default:
       ceph_abort_msg("unrecognized csum word size");
     }